error 076: syntax error in the expression, or invalid function call - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: error 076: syntax error in the expression, or invalid function call (
/showthread.php?tid=255344)
error 076: syntax error in the expression, or invalid function call -
[H]265 - 15.05.2011
pawn Code:
stock IsSwear(const name[])
{
new
IF_TRUE = -1;
loop(i, sizeof psovkeArray)
{
if(!strcmp(name, psovkeArray[i]))
{
IF_TRUE = i;
}
}
return IF_TRUE;
}
pawn Code:
public OnPlayerText(playerid, text[])
{
if(!strcmp(text,IsSwear)) // ERROR LINE!
{
SCM(playerid,plava, "Don't swear!");
return false;
}
return true;
}
ERROR:
Code:
error 076: syntax error in the expression, or invalid function call
Re: error 076: syntax error in the expression, or invalid function call -
Biesmen - 15.05.2011
pawn Code:
public OnPlayerText(playerid, text[])
{
if(IsSwear(text))
{
SCM(playerid,plava, "Don't swear!");
return false;
}
return true;
}