21.03.2012, 14:32
Hello, I am trying to make a script that logs my textdraws, due to debugging:
The thing is, the log file shows this:
TextDrawShowForPlayer(0, 104){%2}
Anyone knows a way to do this?
I already tried :
#define TextDrawShowForPlayer(%1,%2) TextDrawShowForPlayerF(%1,%2, %2)
(without the "" quotes...)
Thank you in advance
Code:
stock TextDrawShowForPlayerF(playerid, Text:text, str[]) //playerid(INT), The textdraw(TEXT), extra logging text(STRING) { new deb[128]; format(deb, 128 "TextDrawShowForPlayer(%d, %d){%s}\n", playerid, text, str); //Shows the playerid, the ID of the text (yes, that works) and I want to let it show the variable's name, for example TextDrawShowForPlayer(0, 104){txtTimeDisplay} LogF(deb); // My function to log something into a separate file TextDrawShowForPlayer(playerid, text);//Actually, show it } #define TextDrawShowForPlayer(%1,%2) TextDrawShowForPlayerF(%1,%2, "%2") //Define it so, that the Logging function is called
TextDrawShowForPlayer(0, 104){%2}
Anyone knows a way to do this?
I already tried :
#define TextDrawShowForPlayer(%1,%2) TextDrawShowForPlayerF(%1,%2, %2)
(without the "" quotes...)
Thank you in advance