Error 001: Expected token: ";", but found ")"
#1

Hi, i have this little problem with my script.
I made a /rac command but it keeps giving me a nice error.
I'm not familiar with strcmp because i used ZCMD before.
This is the code:

pawn Код:
if(strcmp(cmd, "/rtc", true) == 0 || strcmp(cmd, "/respawnthiscar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 3)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
                return 1;
            }
            else
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, " Syntax: /rac [vehid]");
                    return 1;
                }
                new vehicleid43;
                vehicleid43 = ReturnUser(tmp);
                SetVehicleToRespawn(vehicleid43);
                new adminstring[128],adminname[MAX_PLAYER_NAME];
                GetPlayerName(playerid,adminname,sizeof(adminname));
                format(adminstring,sizeof(adminstring),"AdmCmd: %s respawned vehicle %i",adminname,vehicleid43);
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(PlayerInfo[i][pAdmin] => 1) //Line 15714
                    {
                        SendClientMessage(i,COLOR_RED,adminstring);
                    }
                }
            }
        }
        return 1;
And this is the error:
Код:
D:\Scripting\SAMP\Indungi HD Rp\gamemodes\GreenRPR.pwn(15714) : warning 211: possibly unintended assignment
D:\Scripting\SAMP\Indungi HD Rp\gamemodes\GreenRPR.pwn(15714) : error 029: invalid expression, assumed zero
D:\Scripting\SAMP\Indungi HD Rp\gamemodes\GreenRPR.pwn(15714) : warning 215: expression has no effect
D:\Scripting\SAMP\Indungi HD Rp\gamemodes\GreenRPR.pwn(15714) : error 001: expected token: ";", but found ")"
D:\Scripting\SAMP\Indungi HD Rp\gamemodes\GreenRPR.pwn(15714) : error 029: invalid expression, assumed zero
D:\Scripting\SAMP\Indungi HD Rp\gamemodes\GreenRPR.pwn(15714) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Thank you.
Reply
#2

Change to:
pawn Код:
>=
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Change to:
pawn Код:
>=
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)