Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 13,353 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
can lite_C printf __LINE__ and __FILE__ likes C? #410190
10/30/12 10:26
10/30/12 10:26
Joined: Dec 2009
Posts: 128
China
frankjiang Offline OP
Member
frankjiang  Offline OP
Member

Joined: Dec 2009
Posts: 128
China
DLL function:


DLLFUNC void DLL_LineFile(int* line,char* file){
*line = __LINE__;
memset(file,0,256);
memcpy(file,__FILE__,strlen(__FILE__));
}


development 3d game is interesting!
Re: can lite_C printf __LINE__ and __FILE__ likes C? [Re: frankjiang] #410196
10/30/12 10:52
10/30/12 10:52
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
no. LiteC does not include _FILE_, __LINE__ or similar preprocessors.
Calling such functionality from a dll will ofc not work, as in this case __FILE__ / __LINE__ will indicate the source code position in the plugin.

Re: can lite_C printf __LINE__ and __FILE__ likes C? [Re: TechMuc] #410243
10/31/12 02:38
10/31/12 02:38
Joined: Dec 2009
Posts: 128
China
frankjiang Offline OP
Member
frankjiang  Offline OP
Member

Joined: Dec 2009
Posts: 128
China
any one have a good idea to do this?Thanks guys.
__FILE__ or __LINE___ use in Lite_C


development 3d game is interesting!
Re: can lite_C printf __LINE__ and __FILE__ likes C? [Re: frankjiang] #410245
10/31/12 03:05
10/31/12 03:05
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
As TechMuc already told you: you cannot use the __FILE__ or __LINE__ macros. The only workaround is inserting the line numbers hardcoded into the sourcecode. That's an approach I definitely wouldn't recommend though.


Always learn from history, to be sure you make the same mistakes again...
Re: can lite_C printf __LINE__ and __FILE__ likes C? [Re: frankjiang] #410247
10/31/12 03:47
10/31/12 03:47
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Originally Posted By: frankjiang
any one have a good idea to do this?

Bump this thread to give it further attention: http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=384087&Main=46054#Post384087

Otherwise, what Uhrwerk and TechMuc said, there is not much you can do here.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1