warning 219: local variable "idcar" shadows a variable at a preceding level site:forum.sa-mp.com -
Tihoy232 - 31.01.2018
Код:
if(!strcmp(cmd, "/engine", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsPlayerConnected(playerid))
{
if(!engineOn[GetPlayerVehicleID(playerid)])
{
new idcar = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) return 1;
if(IsARentableVeh(idcar))
{
if(HireCar[playerid] != idcar) return 1;
}
if(IsAHarvest(idcar)) return 1;
if(IsADrugHarvest(idcar)) return 1;
if(IsASweeper(idcar)) return 1;
if(IsASalesVehicle(idcar)) return 1;
if(CanTurnEngine[playerid] != idcar && CanTurnEngine[playerid] == 9999)
return SendClientMessage(playerid, COLOR_GREY,"* You cannot turn this car's engine!");
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(string, sizeof(string), "* %s spins a key and tries to start vehicle engine.", plname);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
if(PlayerInfo[playerid][pAdmin] < 1337 && PlayerInfo[playerid][pAdminDuty] == 1)
{
SetTimerEx("StartingTheVehicle",1,0,"i",playerid);
}
else
Line
Код:
C:\Documents and Settings\Administrator\My Documents\Downloads\GGWRPV4.2\gamemodes\GGWRP.pwn(28058) : warning 219: local variable "idcar" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
PHP ERROR IDCAR
Код:
new idcar = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 1;
if(pveh == 510 || pveh == 462 || pveh == 481 || pveh == 509) return 1;
if(IsARentableVeh(idcar))
{
if(HireCar[playerid] != idcar) return 1;
}
Re: warning 219: local variable "idcar" shadows a variable at a preceding level site:forum.sa-mp.com -
Flamehaze7 - 31.01.2018
You simply have defined idcar two times, so you got two same variables, you have to rename one of the two
idcar