Errors Preceding Level -
cedizon - 29.05.2014
When i put this Script
pawn Код:
forward WireIgnition(playerid, vehicleid);
public WireIgnition(playerid, vehicleid)
{
new rand = random(7), string[128];
PlayerInfo[playerid][pJackingCar] =0;
if(IsPlayerInVehicle(playerid, vehicleid))
{
if(rand == 1 || rand == 2) // Successful
{
format(string, sizeof(string), "* %s successfully wires the ignition, turning the engine on.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetTimerEx("DisableVehicleAlarm", 30000, 0, "d", vehicleid);
SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle engine starting, please wait...");
SetTimerEx("SetVehicleEngine", 1000, 0, "dd", vehicleid, playerid);
}
else
{
format(string, sizeof(string), "* %s fails to wire the ignition.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetTimerEx("DisableVehicleAlarm", 30000, 0, "d", vehicleid);
}
}
else
{
format(string, sizeof(string), "* %s fails to wire the ignition.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetTimerEx("DisableVehicleAlarm", 30000, 0, "d", vehicleid);
}
}
This Warnings Comes, i need to fix this please help,
Код:
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36239) : warning 219: local variable "engine" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36239) : warning 219: local variable "lights" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36239) : warning 219: local variable "alarm" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36239) : warning 219: local variable "doors" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36239) : warning 219: local variable "bonnet" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36239) : warning 219: local variable "boot" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36239) : warning 219: local variable "objective" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36252) : warning 219: local variable "engine" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36252) : warning 219: local variable "lights" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36252) : warning 219: local variable "alarm" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36252) : warning 219: local variable "doors" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36252) : warning 219: local variable "bonnet" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36252) : warning 219: local variable "boot" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36252) : warning 219: local variable "objective" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36263) : warning 219: local variable "engine" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36263) : warning 219: local variable "lights" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36263) : warning 219: local variable "alarm" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36263) : warning 219: local variable "doors" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36263) : warning 219: local variable "bonnet" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36263) : warning 219: local variable "boot" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36263) : warning 219: local variable "objective" shadows a variable at a preceding level
Re: Errors Preceding Level -
Adityz - 29.05.2014
Try This -
pawn Код:
forward WireIgnition(playerid, vehicleid);
public WireIgnition(playerid, vehicleid)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
new rand = random(7), string[128];
PlayerInfo[playerid][pJackingCar] =0;
if(IsPlayerInVehicle(playerid, vehicleid))
{
if(rand == 1 || rand == 2) // Successful
{
format(string, sizeof(string), "* %s successfully wires the ignition, turning the engine on.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetTimerEx("DisableVehicleAlarm", 30000, 0, "d", vehicleid);
SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle engine starting, please wait...");
SetTimerEx("SetVehicleEngine", 1000, 0, "dd", vehicleid, playerid);
}
else
{
format(string, sizeof(string), "* %s fails to wire the ignition.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetTimerEx("DisableVehicleAlarm", 30000, 0, "d", vehicleid);
}
}
else
{
format(string, sizeof(string), "* %s fails to wire the ignition.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetTimerEx("DisableVehicleAlarm", 30000, 0, "d", vehicleid);
}
}
Re: Errors Preceding Level -
cedizon - 29.05.2014
Код:
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36231) : warning 219: local variable "engine" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36231) : warning 219: local variable "lights" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36231) : warning 219: local variable "alarm" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36231) : warning 219: local variable "doors" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36231) : warning 219: local variable "bonnet" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36231) : warning 219: local variable "boot" shadows a variable at a preceding level
C:\Users\pc\Desktop\Servers\SGRP\gamemodes\VGRP.pwn(36231) : warning 219: local variable "objective" shadows a variable at a preceding level
Same Problem
Re: Errors Preceding Level -
BroZeus - 29.05.2014
pawn Код:
forward WireIgnition(playerid, vehicleid);
public WireIgnition(playerid, vehicleid)
{
new rand = random(7), string[128];
PlayerInfo[playerid][pJackingCar] =0;
if(IsPlayerInVehicle(playerid, vehicleid))
{
if(rand == 1 || rand == 2) // Successful
{
format(string, sizeof(string), "* %s successfully wires the ignition, turning the engine on.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetTimerEx("DisableVehicleAlarm", 30000, 0, "d", vehicleid);
SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle engine starting, please wait...");
SetTimerEx("SetVehicleEngine", 1000, 0, "dd", vehicleid, playerid);
}
else
{
format(string, sizeof(string), "* %s fails to wire the ignition.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetTimerEx("DisableVehicleAlarm", 30000, 0, "d", vehicleid);
}
}
else
{
format(string, sizeof(string), "* %s fails to wire the ignition.", GetPlayerNameEx(playerid));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
SetTimerEx("DisableVehicleAlarm", 30000, 0, "d", vehicleid);
}
}
Re: Errors Preceding Level -
cedizon - 29.05.2014
@BroZeus , Thanks
Repped , but how did chu' fixed it?? can you tell me how?? so i know later?
Re: Errors Preceding Level -
NaClchemistryK - 29.05.2014
Код:
local variable "symbolhere" shadows a variable at a preceeding level
this error means that your variable you have created has a similar name to another variable. This can be fixed by changing the name of the variable.
And to all other seniors above who helped,
you should always tell him what he did wrong. just posting scripts is not complete scripting help
Re: Errors Preceding Level -
BroZeus - 29.05.2014
i did by removing this line "new engine,lights,alarm,doors,bonnet,boot,objective;"
because there is one moreline like this on top of your script some where so its cazing this problem because the variable have been defined 2 times