Y_INI reading (INI_LOAD) issue.
#5

It crashed. So, I edited the code and made it don't crash anymore. Even though it shows on the msg:
Code:
Name: | Cash: 0
While on the file:
Code:
Name = the_runner
Password = *****
Cash = 1000
Also printed 3 times: PRocessed here...

Actually code:
pawn Code:
CMD:status(playerid,params[])
{
    new string[128];
    format(playerfile,sizeof(playerfile),PLAYER,GetMyName(playerid)) && printf("PLAYERFILE: %s | playerfile: %s",PLAYER,playerfile);
    INI_ParseFile(playerfile, "LoadOneUser", .extra = playerid);
    print("the CMD:status has been processed . . . ");
    format(string,sizeof(string),"Name: %s | Cash: %i",PlayerInfo[playerid][Name],PlayerInfo[playerid][Cash]);
    Msg(playerid, color, string);
    return 1;
}
forward LoadOneUser(playerid, tag[], name[], value[]);
public LoadOneUser(playerid, tag[], name[], value[])
{
   printf("PRocessed here");
   INI_String("Name", PlayerInfo[playerid], Name);
   INI_Int("Cash", PlayerInfo[playerid][Cash]);
   return 0;
}
Reply


Messages In This Thread
Y_INI reading (INI_LOAD) issue. - by blackwave - 13.01.2011, 17:07
Re: Y_INI reading (INI_LOAD) issue. - by Finn - 13.01.2011, 17:25
Re: Y_INI reading (INI_LOAD) issue. - by blackwave - 13.01.2011, 17:27
Re: Y_INI reading (INI_LOAD) issue. - by Finn - 13.01.2011, 17:33
Re: Y_INI reading (INI_LOAD) issue. - by blackwave - 13.01.2011, 17:42
Re: Y_INI reading (INI_LOAD) issue. - by blackwave - 14.01.2011, 00:14

Forum Jump:


Users browsing this thread: 1 Guest(s)