SA-MP Forums Archive
Expected Token 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: Expected Token Error (/showthread.php?tid=659957)



Expected Token Error - TheMaxo - 21.10.2018

Help me, i have this error showing up

C:\Users\user\Desktop\Server\3Run4Ever(43) : error 001: expected token: ")", but found "<"
C:\Users\user\Desktop\Server\3Run4Ever(43) : error 085: no states are defined for symbol "FormatMessage"
C:\Users\user\Desktop\Server\3Run4Ever(43) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\Server\3Run4Ever(43) : fatal error 107: too many error messages on one line

Here's the entire code:

stock FormatMessage(i, color, msg[], va_args<>) //LINE43
{
return SendClientMessage(i, color, va_return(msg, va_start<3>));
}

stock FormatMessageToAll(msg[], va_args<>)
{
return SendClientMessageToAll(-1, va_return(msg, va_start<1>));
}

stock LangFormatMessage(playerid, lang1[], lang2[], va_args<>)
{
return SendLangMessage(playerid, -1, va_return(lang1, va_start<3>), va_return(lang2, va_start<3>));
}

stock strcatex(string[], formatt[], va_args<>)
{
new str[180];
va_format(str, sizeof(str), formatt, va_start<2>);
return strcat(string, str, sizeof(str));
}


Re: Expected Token Error - v1k1nG - 21.10.2018

Ciao, maybe the problem is in
PHP код:
stock FormatMessage(icolormsg[], va_args<>) // Qui 
As
PHP код:
stock FormatMessage(icolormsg[], va_args)
{
return 
SendClientMessage(icolorva_return(msgva_start<3>));

isn't giving errors.
I am not sure if removing the "<>" will simply allow compiling though.


Re: Expected Token Error - TheMaxo - 21.10.2018

Sorry, i've tried to compile without the <> but it give me others errors..