What's wrong with this? (null)
#1

pawn Код:
stock GetFactionRank(playerid)
{
    new rank[24];
    if(Player[playerid][FactionRank] == 0)rank = "n/a";
    else if(Player[playerid][FactionRank] == 1)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankOne]);
    else if(Player[playerid][FactionRank] == 2)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankTwo]);
    else if(Player[playerid][FactionRank] == 3)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankThree]);
    else if(Player[playerid][FactionRank] == 4)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankFour]);
    else if(Player[playerid][FactionRank] == 5)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankFive]);
    else if(Player[playerid][FactionRank] == 6)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankSix]);
    else if(Player[playerid][FactionRank] == 7)format(rank, sizeof(rank), "%s", Factions[Player[playerid][Faction]][RankSeven]);
    return rank;
}
returns "(null)" when I print it out.

pawn Код:
print(GetFactionRank(playerid));
Reply


Messages In This Thread
What's wrong with this? (null) - by RedCounty - 02.04.2014, 02:34
Re: What's wrong with this? (null) - by RedCounty - 02.04.2014, 02:47

Forum Jump:


Users browsing this thread: 1 Guest(s)