Unreachable code
#1

Код:
D:\STRUCTURE\test\gamemodes\test123.pwn(34483) : error 010: invalid function or declaration
Here are the lines:
Код:
		}
	    else
	    {
			SetPlayerHealth(playerid,65535.0);
			SetPlayerArmour(playerid,65535.0);
			PlayerSpawnStats[playerid][pstime] = 21;
		             PlayerSpawnStats[playerid][psx] = 2336.9832;
		             PlayerSpawnStats[playerid][psy] = -1244.5867;
		             PlayerSpawnStats[playerid][psz] = 22.5000;
			SetPlayerToTeamColor(playerid);
			SetPlayerPos(playerid,2336.9832,-1244.5867,22.5000); // Warp the player
			SetPlayerFacingAngle(playerid,0.0);
			SetPlayerInterior(playerid,0);
			return 1;
		}
	}
	return 1;
}
Reply
#2

What is exactly the line 34483?
Reply
#3

pawn Код:
}
        else
        {
            SetPlayerHealth(playerid,65535.0);
            SetPlayerArmour(playerid,65535.0);
            PlayerSpawnStats[playerid][pstime] = 21;
                     PlayerSpawnStats[playerid][psx] = 2336.9832;
                     PlayerSpawnStats[playerid][psy] = -1244.5867;
                     PlayerSpawnStats[playerid][psz] = 22.5000;
            SetPlayerToTeamColor(playerid);
            SetPlayerPos(playerid,2336.9832,-1244.5867,22.5000); // Warp the player
            SetPlayerFacingAngle(playerid,0.0);
            SetPlayerInterior(playerid,0);
            return 1;
        }
   
    return 1;
}
may be this could work just guessing as this error occurs to me when i close a extra brace.
Reply
#4

Can we have the line please ?
Reply
#5

same, doesn't work the line is the return 1;

Quote:

{
SetPlayerHealth(playerid,65535.0);
SetPlayerArmour(playerid,65535.0);
PlayerSpawnStats[playerid][pstime] = 21;
PlayerSpawnStats[playerid][psx] = 2336.9832;
PlayerSpawnStats[playerid][psy] = -1244.5867;
PlayerSpawnStats[playerid][psz] = 22.5000;
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,2336.9832,-1244.5867,22.5000); // Warp the player
SetPlayerFacingAngle(playerid,0.0);
SetPlayerInterior(playerid,0);
return 1;
}

THIS ONE return 1;
}

Reply
#6

Its a simply warning , unrecheable code means it wont get to your line (wich contain return 1 . Just remove return 1 and u will lose that warning . That return 1; will never be called anyway because all the cases have been covered .
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)