Dini bug?
#1

Whenever I /reloadfs, /GMX, and /changemode,
all of my save variable resets or turns into 0.

Why?
Reply
#2

Do you mean all your saved variables in your files are set to zero ?

If this is the case then you either never set values to them correctly or you have a custom function or something which isn't reading/using your variables correctly, either way we would require some code to be able to figure this out as you are pretty vague dude.
Reply
#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
#4

That's always going to be zero dude.

Read > 0
Write > read value

There is no setting any value to it (example[]) other than the read.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)