Y_INI Values
#1

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
Reply
#2

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

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]);
Reply
#4

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.
Reply
#5

It still Spams out the player file thanks for tryin though
Reply
#6

Mind posting the Error messages?
Reply
#7

There isnt any

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

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
Reply
#9

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.
Reply
#10

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)