24.04.2009, 22:13
Quote:
Originally Posted by OmeRinG
Show us the current code and how you declared the variables on top
|
Код:
if (strcmp("/s", cmdtext, true, 10) == 0) { new Float:Z[MAX_PLAYERS]; GetVehicleZAngle(playerid,Z[playerid]); GetPlayerPos(playerid, ppx[playerid], ppy[playerid], ppz[playerid]); SendClientMessage (playerid, COLOR_YELLOW, "Position Saved!"); return 1; } if (strcmp("/l", cmdtext, true, 10) == 0) { new Float:Z[MAX_PLAYERS]; if(IsPlayerInAnyVehicle(playerid)) { SetVehicleZAngle(playerid,Z[playerid]); SetVehiclePos(GetPlayerVehicleID(playerid), ppx[playerid], ppy[playerid], ppz[playerid]); } else { SetPlayerPos(playerid, ppx[playerid], ppy[playerid], ppz[playerid]); } SendClientMessage (playerid, COLOR_YELLOW, "You have been teleported."); return 1; }
Then I switched to this:
Код:
if (strcmp("/s", cmdtext, true, 10) == 0) new Float:Z[MAX_PLAYERS]; { GetVehicleZAngle(playerid,Z[playerid]);...
Код:
if (strcmp("/l", cmdtext, true, 10) == 0) new Float:Z[MAX_PLAYERS]; { if(IsPlayerInAnyVehicle(playerid))...
Код:
C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : error 003: declaration of a local variable must appear in a compound block C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : warning 221: label name "Float" shadows tag name C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : error 017: undefined symbol "Z" C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : warning 215: expression has no effect C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : error 001: expected token: ";", but found "]" C:\Program\ROCKST~1\GTASAN~1\samp\GAMEMO~1\SeRVeR.pwn(1017) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.