SA-MP Forums Archive
DEBUG Mode - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: DEBUG Mode (/showthread.php?tid=645469)



DEBUG Mode - Belengher - 27.11.2017

How can I make this stock of (fixes.nc) with DEBUG?

Quote:

#if FIX_fwrite
stock FIXES_fwrite(File:handle, const string[])
{
return handle && fwrite(handle, string);
}

#define _ALS_fwrite
#define fwrite( FIXES_fwrite(
#endif

I tried so, but it made a mistake ...

Quote:

#if FIX_fwrite
stock FIXES_fwrite(File:handle, const string[])
{
printf("START: fwrite: (%s)", handle);
return handle && fwrite(handle, string);
}

#define _ALS_fwrite
#define fwrite( FIXES_fwrite(
#endif

Thank you:


Re: DEBUG Mode - Belengher - 27.11.2017

UPaaaaaaaaaaaa


Re: DEBUG Mode - OneDay - 27.11.2017

printf("START: fwrite: (%d)", _:handle);

or:

FIXES_PRINTF("START: fwrite: (%d)", _:handle);


Re: DEBUG Mode - Meller - 27.11.2017

Quote:

File:handle

isn't a string, it's an integer with the highlight of File, in case you're as @OneDay provided code for, trying to show the handle ID, then use _: handle for a non-highlighted integer (%i // %d). However, if you're trying to provide the file directory, then you will have to modify your code to pass over the directory while opening File: handle.