05.10.2013, 16:58
Hello guys
Because i want to see the logs at my server's panel, i decided to transfer them to MySQL. Also, to don't have two lines for each log, i have created a function, what looks like this, when i use it to save a log:
First i tried to do it with a stocks, using numargs() and getarg() functions, but didn't work. After, i've tried to make a macro, but this also don't work. Here is the macro:
When i compile it shows me that "SaveToFile" function doesn't exists, but it exists. I think it's something wrong with 'da function, but i don't know what.
Thanks in advance xD.
Because i want to see the logs at my server's panel, i decided to transfer them to MySQL. Also, to don't have two lines for each log, i have created a function, what looks like this, when i use it to save a log:
pawn Код:
SaveToFile("KickLog", "Player %s has been kicked from server. Reason: Didn't know how to script this function", "Edvin");
pawn Код:
#define SaveToFile((%0), (%1), (%2)) \
{\
new string[2048];\
format(string, 2048, (%1), %2);\
format(gString, sizeof(gString), "INSERT INTO `logs` (`log_id`, `log_name`, `log_text`, `datetime`) VALUE(0, '%s', '%s', '%s')", log_name, string, DateTime());\
mysql_function_query(handle, gString, false, "", "");\
}\
pawn Код:
E:\Server.pwn(2221): error 017: undefined symbol "SaveToFile"
E:\Server.pwn(2221) : error 017: undefined symbol "SaveToFile"
And they continue...