expected token: "-string end-", but found "-identifier-"
#1

Код:
C:\Users\Aerotactics' PC\Desktop\ALSRP\filterscripts\adminsystemv1.pwn(469) : error 001: expected token: "-string end-", but found "-identifier-"
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (PlayerInfo[playerid][pBeta]==1)
    {
        if (cmdtext == "/goto" || "/sethunger" || "/bsay" || "/setthirst" || "/startround" || "/endround" || "/setbeta")
        { //^that line
            new pname[MAX_PLAYER_NAME];
            GetPlayerName(playerid,pname,sizeof(pname));
            for (new i=0;i<MAX_PLAYERS;i++)
            {
                if (PlayerInfo[i][pBeta]>1)
                {
                    new string[128];
                    format(string,sizeof(string),"[Trial Tester]%s sent a command: %s",pname,cmdtext);
                    SendClientMessage(i,COLOR_CYAN,string);
                    return 1;
                }
            }
        }
    }
    return 0;
}
Reply
#2

Check @ Haydz post.
Reply
#3

You can't match strings like that in PAWN, this way looks ugly but it should work

pawn Код:
if(strcmp("/goto", cmdtext, true, 10) == 0 || strcmp("/sethunger", cmdtext, true, 10) == 0 || strcmp("/bsay", cmdtext, true, 10) == 0 || strcmp("/setthirst", cmdtext, true, 10) == 0
    || strcmp("/startround", cmdtext, true, 11) == 0 || strcmp("/endround", cmdtext, true, 10) == 0 || strcmp("/setbeta", cmdtext, true, 10) == 0)
Reply
#4

Oh yeah, you have right. Editing my post.
Reply
#5

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
Oh yeah, you have right. Editing my post.
Thanks guys!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)