PDA

View Full Version : I dont see why I get these errors


POL_george
01/12/2016, 09:44 AM
if(PlayerInfo[playerid][pAdmin] => 2) return SendClientMessage(playerid, -1, "Tu nu ai previlegii de "COL_MAGENTA" Admin LV2!");

C:\Users\bpocn\Desktop\sa\server\gamemodes\Gm2.pwn (417) : warning 211: possibly unintended assignment
C:\Users\bpocn\Desktop\sa\server\gamemodes\Gm2.pwn (417) : error 029: invalid expression, assumed zero
C:\Users\bpocn\Desktop\sa\server\gamemodes\Gm2.pwn (417) : warning 215: expression has no effect
C:\Users\bpocn\Desktop\sa\server\gamemodes\Gm2.pwn (417) : error 001: expected token: ";", but found ")"
C:\Users\bpocn\Desktop\sa\server\gamemodes\Gm2.pwn (417) : error 029: invalid expression, assumed zero
C:\Users\bpocn\Desktop\sa\server\gamemodes\Gm2.pwn (417) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
the code:
CMD:spectate(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, ""COL_WHITE"Sintaxa corecta este: /"COL_RED"spectate "COL_WHITE"["COL_RED"playerid/name"COL_WHITE"]");
if(PlayerInfo[playerid][pAdmin] => 2) return SendClientMessage(playerid, -1, "Tu nu ai previlegii de "COL_MAGENTA" Admin LV2!");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, - 1, ""COL_WHITE"Userul nu e conectat!");
SendClientMessage(playerid, -1 "Pentru a oprii spectatarea foloseste "COL_RED"/unspectate");
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, targetid);
return 1;
}

POL_george
01/12/2016, 09:55 AM
NvM I solved