warning
#1

i have this warning
pawn Код:
C:\Documents and Settings\Administrator.WINXPSP3\щемзп дтбегд\windows\gamemodes\GRP.pwn(51267) : warning 225: unreachable code
it's after i put vehicle control system
pawn Код:
{
    new veh = GetPlayerVehicleID(playerid);
    new engine,lights,alarm,doors,bonnet,boot,objective;
    if(dialogid == 1)
    {
        if(!response) return SendClientMessage(playerid, 0xCC0000FF, "INFORMATION : You clicked Cancel");
        switch(listitem)
        {
            case 0:
            {
                if(GetPVarInt(playerid, "Lights") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Lights", 1);
                }
                else if(GetPVarInt(playerid, "Lights") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Lights", 0);
                }
            }
            case 1:
            {
                if(GetPVarInt(playerid, "Bonnet") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
                    SetPVarInt(playerid, "Bonnet", 1);
                }
                else if(GetPVarInt(playerid, "Bonnet") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
                    SetPVarInt(playerid, "Bonnet", 0);
                }
            }
            case 2:
            {
                if(GetPVarInt(playerid, "Boot") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
                    SetPVarInt(playerid, "Boot", 1);
                }
                else if(GetPVarInt(playerid, "Boot") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
                    SetPVarInt(playerid, "Boot", 0);
                }
            }
            case 3:
            {
                if(GetPVarInt(playerid, "Doors") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
                    SetPVarInt(playerid, "Doors", 1);
                }
                else if(GetPVarInt(playerid, "Doors") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
                    SetPVarInt(playerid, "Doors", 0);
                }
            }
            case 4:
            {
                if(GetPVarInt(playerid, "Engine") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Engine", 1);
                }
                else if(GetPVarInt(playerid, "Engine") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Engine", 0);
                }
            }
            case 5:
            {
                if(GetPVarInt(playerid, "Alarm") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Alarm", 1);
                }
                else if(GetPVarInt(playerid, "Alarm") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,VEHICLE_PARAMS_OFF,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Alarm", 0);
                }
            }
        }
        return 1;
    }
    return 0;
}
    if(dialogid == 3)-error here
Reply
#2

//bump
Reply
#3

Why you return 0; the 0 is at the end
pawn Код:
{
    new veh = GetPlayerVehicleID(playerid);
    new engine,lights,alarm,doors,bonnet,boot,objective;
    if(dialogid == 1)
    {
        if(!response) return SendClientMessage(playerid, 0xCC0000FF, "INFORMATION : You clicked Cancel");
        switch(listitem)
        {
            case 0:
            {
                if(GetPVarInt(playerid, "Lights") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Lights", 1);
                }
                else if(GetPVarInt(playerid, "Lights") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Lights", 0);
                }
            }
            case 1:
            {
                if(GetPVarInt(playerid, "Bonnet") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
                    SetPVarInt(playerid, "Bonnet", 1);
                }
                else if(GetPVarInt(playerid, "Bonnet") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
                    SetPVarInt(playerid, "Bonnet", 0);
                }
            }
            case 2:
            {
                if(GetPVarInt(playerid, "Boot") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
                    SetPVarInt(playerid, "Boot", 1);
                }
                else if(GetPVarInt(playerid, "Boot") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
                    SetPVarInt(playerid, "Boot", 0);
                }
            }
            case 3:
            {
                if(GetPVarInt(playerid, "Doors") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
                    SetPVarInt(playerid, "Doors", 1);
                }
                else if(GetPVarInt(playerid, "Doors") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
                    SetPVarInt(playerid, "Doors", 0);
                }
            }
            case 4:
            {
                if(GetPVarInt(playerid, "Engine") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Engine", 1);
                }
                else if(GetPVarInt(playerid, "Engine") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Engine", 0);
                }
            }
            case 5:
            {
                if(GetPVarInt(playerid, "Alarm") == 0)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Alarm", 1);
                }
                else if(GetPVarInt(playerid, "Alarm") == 1)
                {
                    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
                    SetVehicleParamsEx(veh,engine,lights,VEHICLE_PARAMS_OFF,doors,bonnet,boot,objective);
                    SetPVarInt(playerid, "Alarm", 0);
                }
            }
        }
        return 1;
    }
    if(dialogid == 3)-error here
    //More
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)