Jump to content
  • 0

pomoc warningy


pilly

Dotaz

Cus, pri compilaci mi to hazi tyto warningy

 

2092 - warning 219: local variable "lights" shadows a variable at a preceding level

2016 - warning 219: local variable "lights" shadows a variable at a preceding level

 

Radky

 

2092 : new engine, lights, alarm, doors, bonnet, boot, objective;

2106 : new engine, lights, alarm, doors, bonnet, boot, objective;

Link to comment
Share on other sites

5 odpovědí na tuto otázku

Recommended Posts

  • 0
lebo to je na inom riadku... (môže byť v inej podmienke, inom publicu....)

 

musíš sem dať aj riadky pod tým (cca 5-10)

 

ok

 

if(dialogid == DIALOGID+5){
if(response == 1){
if(listitem == 0){
new vid;
vid = GetPlayerVehicleID(playerid);
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == VEHICLE_PARAMS_ON || engine == -1){
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors ,bonnet,boot,objective);
} else {
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors ,bonnet,boot,objective);
}
}

if(listitem == 1){
new vid;
vid = GetPlayerVehicleID(playerid);
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
if(lights == VEHICLE_PARAMS_ON || lights == -1){
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors ,bonnet,boot,objective);
} else {
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors ,bonnet,boot,objective);
}
}

 

Ale taky to muze byt tim ze mam pawno 0.3e, ne ?

Link to comment
Share on other sites

  • 0

počítanie zátvoriek...

if(dialogid == DIALOGID+5){
if(response == 1){
new vid;
vid = GetPlayerVehicleID(playerid);
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
if(listitem == 0){
if(engine == VEHICLE_PARAMS_ON || engine == -1){
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors ,bonnet,boot,objective);
} else {
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors ,bonnet,boot,objective);
}

if(listitem == 1){
if(lights == VEHICLE_PARAMS_ON || lights == -1){
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors ,bonnet,boot,objective);
} else {
SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors ,bonnet,boot,objective);
}
}
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...