warning 225, help
#1

*****.pwn(11079) : warning 225: unreachable code

Code:
public OnPlayerUpdate(playerid)
{
{
if(GetPlayerMoney(playerid)>PlayerMoney[playerid]){
ResetMoney(playerid);
GivePlayerMoney(playerid,PlayerMoney[playerid]);
}
if(GetPlayerMoney(playerid)<PlayerMoney[playerid]){
PlayerMoney[playerid]=GetPlayerMoney(playerid);
}
return 1;//Тут должен быть обязательно return иначе сервер залогает и вы не будете видеть как играют другие игроки_)
}
    if(IsPlayerNPC(playerid))return 1;// Подключение Ботов
    if(PlayerInfo[playerid][pLevel] >= 15) PlayerInfo[playerid][pDonateRank] = 1;
    if(PlayerInfo[playerid][pLevel] >= 25) PlayerInfo[playerid][pDonateRank] = 2;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(PlayerInfo[playerid][pMask] == 1)
 	{
	 	ShowPlayerNameTagForPlayer(i, playerid, 0);
  }
		   }
 	return 1;
}
Reply
#2

You're getting the same problem as described in this topic here:
https://sampforum.blast.hk/showthread.php?tid=408115

Fixed:

pawn Code:
public OnPlayerUpdate(playerid)
{
    {
        if(GetPlayerMoney(playerid)>PlayerMoney[playerid]){
            ResetMoney(playerid);
            GivePlayerMoney(playerid,PlayerMoney[playerid]);
        }
        if(GetPlayerMoney(playerid)<PlayerMoney[playerid]){
            PlayerMoney[playerid]=GetPlayerMoney(playerid);
        }
    }
    if(IsPlayerNPC(playerid))return 1;// Подключение Ботов
    if(PlayerInfo[playerid][pLevel] >= 15) PlayerInfo[playerid][pDonateRank] = 1;
    if(PlayerInfo[playerid][pLevel] >= 25) PlayerInfo[playerid][pDonateRank] = 2;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[playerid][pMask] == 1)
        {
            ShowPlayerNameTagForPlayer(i, playerid, 0);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)