warning 225: unreachable code Problem
#8

Your original problem is that you have return 1; at the end of the code when every "if" statement ends with return 1;

So all you ahve to do is remove the last return 1; and the w arning will go away. The way you've done it above is wrong, you've removed the wrong return.

You also need to have {} after an if statement if you have more than one function. IE:

Код:
if( newkeys == KEY_SECONDARY_ATTACK ) 
            { 
            if( IsPlayerInRangeOfPoint( playerid, 3.0, 386.2978,173.8582,1008.3828 ) ) 
            SetPlayerPos( playerid, 1480.9410,-1771.8586,18.7958 ); 
            SetPlayerInterior( playerid, 0); 
            GameTextForPlayer( playerid, "Goodbye", 3000, 1 ); 
            return 1; 
          }
to
Код:
if( newkeys == KEY_SECONDARY_ATTACK ) 
            { 
                if( IsPlayerInRangeOfPoint( playerid, 3.0, 386.2978,173.8582,1008.3828 ) ) 
                {
                    SetPlayerPos( playerid, 1480.9410,-1771.8586,18.7958 ); 
                    SetPlayerInterior( playerid, 0); 
                    GameTextForPlayer( playerid, "Goodbye", 3000, 1 );
                } 
                return 1; 
          }
Reply


Messages In This Thread
warning 225: unreachable code Problem - by RoX123 - 10.09.2017, 18:58
Re: warning 225: unreachable code Problem - by Eoussama - 10.09.2017, 19:01
Re: warning 225: unreachable code Problem - by RoX123 - 10.09.2017, 19:08
Re: warning 225: unreachable code Problem - by silverms - 10.09.2017, 19:55
Re: warning 225: unreachable code Problem - by RoX123 - 10.09.2017, 20:04
Re: warning 225: unreachable code Problem - by AmarPlayer - 10.09.2017, 21:17
Re: warning 225: unreachable code Problem - by RoX123 - 10.09.2017, 22:38
Re: warning 225: unreachable code Problem - by TakeiT - 10.09.2017, 22:53
Re: warning 225: unreachable code Problem - by RoX123 - 10.09.2017, 23:07
Re: warning 225: unreachable code Problem - by JasonRiggs - 11.09.2017, 00:02

Forum Jump:


Users browsing this thread: 1 Guest(s)