01.07.2013, 11:23
Hello guys i have an custom made admin system in which i'm adding spectate command, i get errors upon compile. here is my /spec code:
here are errors:
thanks .
pawn Код:
dcmd_spec(playerid, params[])
{
if(spectate[playerid] == 0)
{
new id;
if(pInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE"");
if(sscanf(params, "u", id)) SendClientMessage(playerid,0xFF0000AA, "USAGE: /spec id");
if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,0xFF0000AA, "Player is not found");
new Float:PosX[MAX_PLAYERS], Float:PosY[MAX_PLAYERS], Float:PosZ[MAX_PLAYERS], Float:Angle;
oldspecpos[playerid] = GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
oldspecfaceangle[playerid] = GetPlayerFacingAngle(playerid, Angle);
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, id);
}
else
{
SCM(playerid, COLOR_YELLOW, "* You Have Turned Admin Spectating Mode Off.");
SetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]); // line 1650
SetPlayerFacingAngle(playerid, oldspecfaceangle[playerid]);
TogglePlayerSpectating(playerid, 0);
}
return 1;
}
Код:
D:\eXtreme_Free-Roam_2013\FR 2013\filterscripts\project.pwn(1650) : error 017: undefined symbol "PosX" D:\eXtreme_Free-Roam_2013\FR 2013\filterscripts\project.pwn(1650) : warning 215: expression has no effect D:\eXtreme_Free-Roam_2013\FR 2013\filterscripts\project.pwn(1650) : error 001: expected token: ";", but found "]" D:\eXtreme_Free-Roam_2013\FR 2013\filterscripts\project.pwn(1650) : error 029: invalid expression, assumed zero D:\eXtreme_Free-Roam_2013\FR 2013\filterscripts\project.pwn(1650) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.