SA-MP Forums Archive
Define 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 error? (/showthread.php?tid=630767)



Define error? - DuyDang2412 - 18.03.2017

I have just defined this:
PHP код:
#define Loop:(%0, %1) \
        
for(new = %0< %1i++) 
// /// // // / // / / / /
public OnPlayerSpawn(playerid)
{
    
Loop:(010){
        print(
"Print this text");
    }

And these are my errors:
Quote:

./Callbacks.pwn(2 : warning 236: unknown parameter in substitution (incorrect #define pattern)
./Callbacks.pwn(2 : warning 236: unknown parameter in substitution (incorrect #define pattern)
./Callbacks.pwn(2 : error 029: invalid expression, assumed zero
./Callbacks.pwn(2 : warning 215: expression has no effect
./Callbacks.pwn(2 : error 001: expected token: ";", but found ")"
./Callbacks.pwn(2 : error 029: invalid expression, assumed zero
./Callbacks.pwn(2 : fatal error 107: too many error messages on one line

Please help.


Re: Define error? - Toroi - 18.03.2017

PHP код:
#define Loop:(%0,%1) // No space between the comma and the percent sign. 



Re: Define error? - DuyDang2412 - 18.03.2017

Quote:
Originally Posted by Troydere
Посмотреть сообщение
PHP код:
#define Loop:(%0,%1) // No space between the comma and the percent sign. 
Worked! Thank you very much.