Saveposition problems...
#1

Hi, yesterday i start to bind END and CAPS-LOCK buttons to save/load positions.
T.y. - When you press END button - Position will be saved
When you press CAPS-LOCK button - Possition will load

So, I finish, and: WTF? 4 errors, 1 warning in one line:

C:\Users\User\Desktop\PlayerPress.....pwn(201) : error 017: undefined symbol "saugota"
C:\Users\User\Desktop\PlayerPress.....pwn(201) : warning 215: expression has no effect
C:\Users\User\Desktop\PlayerPress.....pwn(201) : error 001: expected token: ";", but found "]"
C:\Users\User\Desktop\PlayerPress.....pwn(201) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\PlayerPress.....pwn(201) : fatal error 107: too many error messages on one line


Code:

public OnPlayerPressCAPSLOCK(playerid){
if (saugota[playerid] == 1) // 201 line
{
if(IsPlayerInAnyVehicle(playerid))
{
new Interior = GetPlayerInterior(playerid);SetPlayerInterior(play erid,Interior);
new Float:X;
new Float:Y;
new Float:Z;
new VehicleID;
GetPlayerPos(playerid, X, Y, Z);
VehicleID = GetPlayerVehicleID(playerid);
SetVehiclePos(VehicleID,Pos[playerid][0],Pos[playerid][1],Pos[playerid][2]);
SetVehicleZAngle(VehicleID,Pos[playerid][4]);
SetPlayerFacingAngle(playerid,Pos[playerid][3]);
SetCameraBehindPlayer(playerid);
}
else{
SetPlayerPos(playerid,Pos[playerid][0],Pos[playerid][1],Pos[playerid][2]);
SetPlayerFacingAngle(playerid,Pos[playerid][3]);
SetCameraBehindPlayer(playerid);
new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z);
PlayerPlaySound(playerid,1002,X,Y,Z);}
return 1;
}


Please help, thanx
Reply
#2

saugato is just not define before being used...
try doing:
new saugato[MAX_PLAYER];

at the beginning of your script
Reply
#3

Quote:
Originally Posted by blinkpnk
Посмотреть сообщение
saugato is just not define before being used...
try doing:
new saugato[MAX_PLAYER];

at the beginning of your script
Nope...
Reply
#4

Do you have any 'new saugato[MAX_PLAYERS];' in your script? If not, then you should add it like blinkpnk said.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)