24.11.2012, 13:54
Hi , i need some help with this code here :
I get some warnings , but i don't know from what they come out .
I wanna fix these warnings , help please .
REP+
Thanks in advance
pawn Код:
if(newkeys & KEY_JUMP)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new vehid = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
if(vehid == 481 || vehid == 509 || vehid == 510)
return 1;
GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine<=0)
{
GameTextForPlayer(playerid, "~g~Starting the engine...", 1200, 1);
SetTimerEx("StartEngine", 3000, 0, "ii", playerid, vehid);
}
else if(engine<=1)
{
GameTextForPlayer(playerid, "~r~Stopping the engine...", 1200, 1);
SetTimerEx("StopEngine", 3000, 0, "ii", playerid, vehid);
}
}
}
Код:
D:\Downloads\Trucking_Server_2.0\gamemodes\SERVER.pwn(15254) : warning 219: local variable "engine" shadows a variable at a preceding level D:\Downloads\Trucking_Server_2.0\gamemodes\SERVER.pwn(15254) : warning 219: local variable "lights" shadows a variable at a preceding level D:\Downloads\Trucking_Server_2.0\gamemodes\SERVER.pwn(15254) : warning 219: local variable "alarm" shadows a variable at a preceding level D:\Downloads\Trucking_Server_2.0\gamemodes\SERVER.pwn(15254) : warning 219: local variable "doors" shadows a variable at a preceding level D:\Downloads\Trucking_Server_2.0\gamemodes\SERVER.pwn(15254) : warning 219: local variable "bonnet" shadows a variable at a preceding level D:\Downloads\Trucking_Server_2.0\gamemodes\SERVER.pwn(15254) : warning 219: local variable "boot" shadows a variable at a preceding level D:\Downloads\Trucking_Server_2.0\gamemodes\SERVER.pwn(15254) : warning 219: local variable "objective" shadows a variable at a preceding level D:\Downloads\Trucking_Server_2.0\gamemodes\SERVER.pwn(15255) : warning 219: local variable "vehid" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Warnings.
REP+
Thanks in advance