Dini bug?
#3

Well my script is basically like this :
pawn Код:
new example[MAX_PLAYERS];

#define PlayerFile "/Folder/%s.ini"

public OnPlayerConnect(playerid)
{
  new file[126];
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  format(file, sizeof(file), PlayerFile, name);

  if(!dini_Exists(file))
  {
    dini_Create(file);
  }

  example[playerid] = dini_Int(file, "Example");
  return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
  new file[126];
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  format(file, sizeof(file), PlayerFile, name);

  dini_IntSet(file, "Example", example[playerid]);
  return 1;
}
Thanks.
Reply


Messages In This Thread
Dini bug? - by ViruZZzZ_ChiLLL - 17.07.2010, 23:01
Re: Dini bug? - by Donny_k - 17.07.2010, 23:31
Re: Dini bug? - by ViruZZzZ_ChiLLL - 17.07.2010, 23:38
Re: Dini bug? - by Donny_k - 17.07.2010, 23:46

Forum Jump:


Users browsing this thread: 1 Guest(s)