13.02.2012, 22:47
Alright, I am scripting a system to where if I press the KEY_HANDBRAKE, the engine will turn on, along with a GameTextForPlayer will pop up, but everytime I pressed the spacebar, that message came up, so, I editted it to this, and I honestly do not know what is wrong...
I am getting the following error:
Any help will be greatly appreciated, and I am one who +Rep's.
Thanks,
Nmader
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new playerState = GetPlayerState(playerid);
new veh = GetPlayerVehicleID(playerid);
if(newkeys & KEY_HANDBRAKE && playerState == PLAYER_STATE_DRIVER)
{
GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
}
if(veh, 1, 0, 0, 0, 0, 0)
{
GameTextForPlayer(playerid, "~G~Engine On!", 50000, 3);
new
engine,
lights,
alarm,
doors,
bonnet,
boot,
objective;
GetVehicleParamsEx(veh, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(veh, 1, lights, alarm, doors, bonnet, boot, objective);
}
return 1;
}
pawn Код:
C:\Documents and Settings\nmader\Desktop\Lost Roleplay\filterscripts\Engine.pwn(408) : error 017: undefined symbol "engine"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Thanks,
Nmader