Error 001: Expected token: ";", but found ")" - 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: Error 001: Expected token: ";", but found ")" (
/showthread.php?tid=462543)
Error 001: Expected token: ";", but found ")" -
Vlad64 - 07.09.2013
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.
Re: Error 001: Expected token: ";", but found ")" -
Konstantinos - 07.09.2013
Change to:
Re: Error 001: Expected token: ";", but found ")" -
Vlad64 - 07.09.2013
Quote:
Originally Posted by Konstantinos
|
Thanks