Define pattern error - 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: Define pattern error (
/showthread.php?tid=560945)
Define pattern error -
Kaczmi - 31.01.2015
Hello guys, could you tell me where do i have an error? Iґve spent 2 hours on it and I just dont know what to do ;(
Код:
stock printfEx(message[])
{
new Year, Month, Day, Hour, Minute, Second;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
new path1[30]; format(path1, sizeof path1, "%02d\%02d\%02d", Day, Month, Year);
new path[64]; format(path, sizeof path, LOG_FILE_PATH, path1);
new File:soubor = fopen(path, io_append);
new appendTime[50]; format(appendTime, sizeof appendTime, "%02d:%02d:%02d - ", Hour, Minute, Second);
strcat(message, "\r\n", sizeof message);
strins(message, appendTime, 0);
fwrite(soubor, message);
fclose(soubor);
return 1;
}
Код:
#define printff(%0, %1) new jkloip[500]; format(jkloip, sizeof jkloip, %0, %1); printfEx(jkloip);
Код:
unknown parameter in substitution (incorrect #define pattern)
warning 236: unknown parameter in substitution (incorrect #define pattern)
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Код:
printff("%s: Test", PlayerName(playerid));
Thank you.
Re : Define pattern error -
Dutheil - 31.01.2015
Don't put space.
Re: Re : Define pattern error -
Kaczmi - 31.01.2015
Quote:
Originally Posted by Dutheil
|
Oh, poor mistake indeed. Thank you very much.