C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : error 017: undefined symbol "TrunkOpen" C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : warning 215: expression has no effect C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : error 001: expected token: ";", but found "]" C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : error 029: invalid expression, assumed zero C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : fatal error 107: too many error messages on one line
CMD:boot( playerid, params[] )
{
if( !IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, -1, "Error: You need to be in a vehicle." );
{
if(TrunkOpen[playerid] == true);//this line is 5
{
TrunkOpen[playerid] = false;
new pVeh;
new engine,lights,alarm,doors,bonnet,boot,objective;
pVeh = GetPlayerVehicleID( playerid );
GetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, 0, objective);
SendClientMessage(playerid, -1, "Trunk Closed");
}
else
{
TrunkOpen[playerid] = true;
new pVeh;
new engine,lights,alarm,doors,bonnet,boot,objective;
pVeh = GetPlayerVehicleID( playerid );
GetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, 1, objective);
SendClientMessage(playerid, -1, "Trunk Open");
}
}
return 1;
}
// place it at top of you're script.
new TrunkOpen[MAX_PLAYERS];
pawn Код:
|
C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : error 017: undefined symbol "TrunkOpen" C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : error 036: empty statement C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(7) : error 017: undefined symbol "TrunkOpen" C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(15) : error 029: invalid expression, assumed zero C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(17) : error 017: undefined symbol "TrunkOpen"
No you do not need to add MAX_PLAYERS in TruckOpen in the command,
MAX_PLAYERS is getting the players amount out of the server slot (500), i can see you're using an include, mind sending the lines? |
new bool:TrunkOpen[MAX_PLAYERS];
C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PPC_PlayerCommands.inc(6) : error 036: empty statement C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PPC_PlayerCommands.inc(16) : error 029: invalid expression, assumed zero
CMD:boot( playerid, params[] )
{
new bool:TrunkOpen[MAX_PLAYERS];
if( !IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, COLOR_RED, "Error: You need to be in a vehicle." );
{
if(!TrunkOpen[playerid] == true);//this line is 6
{
TrunkOpen[playerid] = false;
new pVeh;
new engine,lights,alarm,doors,bonnet,boot,objective;
pVeh = GetPlayerVehicleID( playerid );
GetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, 0, objective);
SendClientMessage(playerid, COLOR_GREY, "Trunk Closed");
}
else//line 16
{
TrunkOpen[playerid] = true;
new pVeh;
new engine,lights,alarm,doors,bonnet,boot,objective;
pVeh = GetPlayerVehicleID( playerid );
GetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, 1, objective);
SendClientMessage(playerid, COLOR_GREY, "Trunk Open");
}
}
return 1;
}
if(!TrunkOpen[playerid] == true);//this line is 6
change to: if(!TrunkOpen[playerid] == true)//this line is 6 you have ; outside the brackets for some reason? |
if(condition) // dont have any semicolon because it is not closing just checking and executing files inside it
thanks [LoF]Zak |