07.09.2013, 15:41
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:
And this is the error:
Thank you.
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;
Код:
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.