13.09.2011, 15:29
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
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