Errors. Help Need For Command /spec - 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: Errors. Help Need For Command /spec (
/showthread.php?tid=447705)
Errors. Help Need For Command /spec -
Anak - 01.07.2013
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:
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;
}
here are errors:
Код:
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.
thanks
.
Re: Errors. Help Need For Command /spec -
Anak - 01.07.2013
so no one is going to help i need help please