INI Writing problem
#1

When i make an update to my server and write new PlayerInfo entries in the INI file of a specific player so it writes the entry in the end of the INI file.
So how to make it keep the sequence according to my original entries?
Note*: i use Y_INI.

Healthy INI File:


Corrupted INI FIle: (The password entry is the last one)
Reply
#2

show ur saving script
Reply
#3

The
Код:
INI_SetTag("stuff");
Has to have the same tag as the first one you saved with or it will just write under it with another tag.

Edit: Save password when they register so that it never adds it to the end, because it's the first thing to exist. Do you get what I'm saying?
Reply
#4

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
show ur saving script
Actally i will give the example of all enteries:

Код:
new var[32];
			new INI:File = INI_Open(UserPath(playerid));
			INI_SetTag(File, "Statistics");
			INI_WriteString(File, "IP", PlayerInfo[playerid][pIP]);
			INI_WriteInt(File, "Password", PlayerInfo[playerid][pPass]);
			INI_WriteInt(File, "Level", PlayerInfo[playerid][pLevel]);
.....
INI_Close(File);
Reply
#5

Quote:
Originally Posted by bool
Посмотреть сообщение
The
Код:
INI_SetTag("stuff");
Has to have the same tag as the first one you saved with or it will just write under it with another tag.

Edit: Save password when they register so that it never adds it to the end, because it's the first thing to exist. Do you get what I'm saying?
Not exactly. can you show an example of little code?
Reply
#6

Well the top part is self explanatory. If you have two different tags it saves it twice under seperate tags.

You're saving password again at some point, and it's writing it to the bottom because password didn't exist.
Reply
#7

I have only one tag of "Statistics", i need more something to make it save in entry of "Password" to save the sequence?
and yes i did under my save public for player stats that it will write the password - on the dialog login i did:

Код:
PlayerInfo[playerid][pPass] = inputtext;
i stored it and saved it in the public, will it save the sequence?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)