[HELP] Lights
#1

I have this script. What is wrong there?
pawn Код:
if(IsPlayerInAnyVehicle(playerid))
     {
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            if(newkeys & KEY_YES)
            {
                new vehicleid = GetPlayerVehicleID(playerid);
                if(VehicleLights[vehicleid] == 0)
                {
                    new vehicleid, engine, lights, alarm, doors, bonnet, boot, objective;
                    VehicleLights[vehicleid] = 1;
                    SendClientMessage(playerid, COLOR_YELLOW, "You have enabled your car lights.");
                    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
                    SetVehicleParamsEx(vehicleid, engine, true, alarm, doors, bonnet, boot, objective);
                }
                else if(VehicleLights[vehicleid] == 1)
                {
                    new vehicleid, engine, lights, alarm, doors, bonnet, boot, objective;
                    VehicleLights[vehicleid] = 0;
                    SendClientMessage(playerid, COLOR_YELLOW, "You have disabled your car lights.");
                    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
                    SetVehicleParamsEx(vehicleid, engine, false, alarm, doors, bonnet, boot, objective);
                }
            }
            return 1;
        }
     }

and the warnings...


Код:
C:\local\gf.pwn(30949) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\local\gf.pwn(30952) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
C:\local\gf.pwn(30960) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:           7504 bytes
Code size:          1294868 bytes
Data size:          5702028 bytes
Stack/heap size:      16384 bytes; estimated max. usage=5802 cells (23208 bytes)
Total requirements: 7020784 bytes

3 Warnings.
Reply


Messages In This Thread
[HELP] Lights - by monster010 - 08.04.2014, 14:36
Re: [HELP] Lights - by Konstantinos - 08.04.2014, 14:40
Re: [HELP] Lights - by iThePunisher - 08.04.2014, 14:41
Re: [HELP] Lights - by monster010 - 08.04.2014, 14:43
Re: [HELP] Lights - by Konstantinos - 08.04.2014, 14:44
Re: [HELP] Lights - by iThePunisher - 08.04.2014, 14:48
Re: [HELP] Lights - by Konstantinos - 08.04.2014, 14:53

Forum Jump:


Users browsing this thread: 1 Guest(s)