error 076: syntax error in the expression, or invalid function call
#1

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
Reply
#2

pawn Code:
public OnPlayerText(playerid, text[])
{
    if(IsSwear(text))
    {
       SCM(playerid,plava, "Don't swear!");
       return false;
    }
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)