SA-MP Forums Archive
Y_INI Values - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Y_INI Values (/showthread.php?tid=280158)



Y_INI Values - SpankMe2 - 30.08.2011

Y_INI isnt replacing the value it just creates a new one...

Admin = 0
Admin = 0
Level = 0
Admin = 0
Level = 1

Thats the top of the user file


Re: Y_INI Values - [MWR]Blood - 30.08.2011

Well, show the code.
We can't help you without checking it out.


Re: Y_INI Values - SpankMe2 - 30.08.2011

saving
pawn Код:
new INI:File = INI_Open(UserPath(playerid));
    INI_WriteInt(File,"Admin Level",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]
INI_Close(File);


loading
pawn Код:
INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Admin Level",PlayerInfo[playerid][pAdmin]);
    INI_Int("Level",PlayerInfo[playerid][pLevel]);



Re: Y_INI Values - SantarioLeone - 30.08.2011

Quote:
Originally Posted by SpankMe2
Посмотреть сообщение
saving
pawn Код:
new INI:File = INI_Open(UserPath(playerid));
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]

loading
pawn Код:
INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Admin Level",PlayerInfo[playerid][pAdmin]);
    INI_Int("Admin Level",PlayerInfo[playerid][pLevel]);
You have pLevel, and pAdmin named the same thing in the users file.

pawn Код:
INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Admin Level",PlayerInfo[playerid][pAdmin]);
    INI_Int("Player Level",PlayerInfo[playerid][pLevel]);
Try that, i may be wrong, but that is a small error could be the fix.


Re: Y_INI Values - SpankMe2 - 30.08.2011

It still Spams out the player file thanks for tryin though


Re: Y_INI Values - SantarioLeone - 30.08.2011

Mind posting the Error messages?


Re: Y_INI Values - SpankMe2 - 30.08.2011

There isnt any

if there was it wouldnt be able to save the file at all


Re: Y_INI Values - SpankMe2 - 30.08.2011

Plus thats where i was fidling with the things earlyer i created this thread when i was in the midle of changing it back

ill edit that post


Re: Y_INI Values - SantarioLeone - 30.08.2011

It may be possible its a Y_Ini bug cause my Y_Ini wont save anything when a player registers at the moment, so you maybe its not your script, maybe just the Y_Ini. Depending on how much you scripted, think about switching to another dialogue register system.


Re: Y_INI Values - Wesley221 - 30.08.2011

You need to set Tags if you want to write something in it.

pawn Код:
INI_SetTag("Tagname");