Stock not loading/showing. (Y_ini)
#1

Im working on dynamic faction system.
But the thing is the editted ranks don't show after a gmx.
What i do IG:
/adjustrankname 10 Chief
/r Test -> Displays Chief (My Name): Test.
I do a /gmx, Check lspd.ini Rank 10 = Chief.
I come back IG
/r Test -> Displays (My Name): Test.

So thats the problem.
I have put a print At the and of load_factions and at the end of the stock and it showed.

Load factions:
pawn Код:
forward load_factions(name[], value[]);
public load_factions(name[], value[])
{
    INI_Int("LSPDLeader", FacInfo[1][facLeader]);
    INI_Int("LSPDMembers", FacInfo[1][facMembers]);
    INI_Int("Rank0", FacInfo[1][fRank0]);
    INI_Int("Rank1", FacInfo[1][fRank1]);
    INI_Int("Rank2", FacInfo[1][fRank2]);
    INI_Int("Rank3", FacInfo[1][fRank3]);
    INI_Int("Rank4", FacInfo[1][fRank4]);
    INI_Int("Rank5", FacInfo[1][fRank5]);
    INI_Int("Rank6", FacInfo[1][fRank6]);
    INI_Int("Rank7", FacInfo[1][fRank7]);
    INI_Int("Rank8", FacInfo[1][fRank8]);
    INI_Int("Rank9", FacInfo[1][fRank9]);
    INI_Int("Rank10", FacInfo[1][fRank10]);
    INI_Int("Div1", FacInfo[1][fDiv1]);
    INI_Int("Div2", FacInfo[1][fDiv2]);
    INI_Int("Div3", FacInfo[1][fDiv3]);
    INI_Int("Div4", FacInfo[1][fDiv4]);
    print("Factions Loaded!");
    return 1;
}
Rankname stock

pawn Код:
stock FRank(playerid)
{
    new rankname[32];
    if(PlayerInfo[playerid][pMember] == 0)
    {
        format(rankname, sizeof(rankname), "N/A");
    }
    if(PlayerInfo[playerid][pMember] > 0)
    {
        if(PlayerInfo[playerid][pRank] == 0) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pMember]][fRank0]);
        else if(PlayerInfo[playerid][pRank] == 1) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pMember]][fRank1]);
        else if(PlayerInfo[playerid][pRank] == 2) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pMember]][fRank2]);
        else if(PlayerInfo[playerid][pRank] == 3) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pMember]][fRank3]);
        else if(PlayerInfo[playerid][pRank] == 4) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pMember]][fRank4]);
        else if(PlayerInfo[playerid][pRank] == 5) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pMember]][fRank5]);
        else if(PlayerInfo[playerid][pRank] == 6) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pMember]][fRank6]);
        else if(PlayerInfo[playerid][pRank] == 7) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pMember]][fRank7]);
        else if(PlayerInfo[playerid][pRank] == 8) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pMember]][fRank8]);
        else if(PlayerInfo[playerid][pRank] == 9) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pMember]][fRank9]);
        else if(PlayerInfo[playerid][pRank] == 10) format(rankname, sizeof(rankname), "%s", FacInfo[PlayerInfo[playerid][pMember]][fRank10]);
        print("Stock FRank");
    }
    return rankname;
}
OnGameModeInit
pawn Код:
INI_ParseFile("factions/lspd.INI", "load_factions", .bExtra = false);
Anyone a solution?
Reply
#2

Ehm, i actually don't know. I always use a stock for that?
Reply
#3

Ah ok. So you suggest to change
pawn Код:
stock FRank(playerid)
// to
function FRank(playerid)
Or what?
Reply
#4

Will try. And english is not my first language. So i didn't understand what you ment with qualifier.

EDIT: It still doesn't work :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)