File saving question
#1

I have one question.Do i need to use first or second code for file-saving.Sorry for my bad english.

First code:

PHP код:
forward LoadUserData(playerid,name[],value[]);
public 
LoadUserData(playerid,name[],value[])
{
        new 
pKills GetPVarInt(playerid,"Kills");
    
INI_Int("Kills",pKills);

Second code:

PHP код:
forward LoadUserData(playerid,name[],value[]);
public 
LoadUserData(playerid,name[],value[])
{
        new 
pKills[MAX_PLAYERS];
        
pKills[playerid] = GetPVarInt(playerid,"Kills");
    
INI_Int("Kills",pKills[playerid]);

Reply
#2

doesn't work like that.....
pawn Код:
INI_Int("Kills" // this reads the ini file name kills
pawn Код:
pKills[playerid] the variable is not set w/e the value of "kills" is giving u INI_Int("Kills",pKills[playerid]);
use the variable vars are now recommend... like on player death pKills[killerid] ++; carries the killerid value up +1 every time they kill.... don't use vars it won't work... under the loading file function
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)