#define problem.
#1

Hello, I am trying to make a script that logs my textdraws, due to debugging:
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
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
Reply
#2

Sorry, I am answer hungry and it was already on the 2th page...

edit: yet read the rules, and I seem to broke one here; sorry...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)