Warning Unreachable Code?
#4

Indentation, identation, identation. What a horrible mess this is. Let's write that out, shall we? This is YOUR code, I have changed nothing, but the formatting.
PHP код:
if(dialogid == 8)
{
    if(!
response)
    { 
        
RemoveDriverFromVehicle(playerid); 
        return 
1
    }
    { 
// <-- this block is unconditional, so it always gets executed
        
GameTextForPlayer(playerid"Please Wait..."30001);
        
ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"Hotwire Vehicle","You don't have the keys to this vehicle, But this can be hotwired!","Hotwire","Cancel");
        return 
1// <-- hence, this return always gets executed
    
}
    if(
engine[GetPlayerVehicleID(playerid)-1] == 0// <-- hence, this code can never be reached
    

Reply


Messages In This Thread
Warning Unreachable Code? - by jremi - 27.05.2015, 20:22
Re: Warning Unreachable Code? - by Sledgehammer - 27.05.2015, 20:26
Re: Warning Unreachable Code? - by jremi - 27.05.2015, 21:07
Re: Warning Unreachable Code? - by Vince - 27.05.2015, 21:13
Re: Warning Unreachable Code? - by jremi - 28.05.2015, 08:33
Re: Warning Unreachable Code? - by Vince - 28.05.2015, 09:22

Forum Jump:


Users browsing this thread: 1 Guest(s)