[LOGS] SaveToFile function problem.
#1

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:
pawn Код:
SaveToFile("KickLog", "Player %s has been kicked from server. Reason: Didn't know how to script this function", "Edvin");
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:
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, "", "");\
}\
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.
pawn Код:
E:\Server.pwn(2221): error 017: undefined symbol "SaveToFile"
E:\Server.pwn(2221) : error 017: undefined symbol "SaveToFile"
And they continue...
Thanks in advance xD.
Reply


Messages In This Thread
[LOGS] SaveToFile function problem. - by Edvin - 05.10.2013, 16:58
Re: [LOGS] SaveToFile function problem. - by Konstantinos - 05.10.2013, 17:46
Re: [LOGS] SaveToFile function problem. - by Edvin - 05.10.2013, 22:54

Forum Jump:


Users browsing this thread: 2 Guest(s)