Y_INI parsefile doesn't load integers
#1

In my script the players are able to save up to five characters on the user account. When they spawn with their selected character Y_INI should load their values. The strings load well but my integers aren't.

Here's an example, printing a few values (Sorry for my native language): http://i.imgur.com/gJDTH9S.png

It's really weird because I didn't change much in the code since it's working well at the login part, it perfectly parses the user's file.

So the problem is, the program loads all the strings but it doesn't load the integers.
I probably missed something in Y_Less's parsefile tutorial really badly... Can you give me a helping hand?

Edit: Code: http://pastebin.com/DMLZFpsZ
Reply
#2

Bump anyone?
Reply
#3

Post your codes, and we will try to help.
Reply
#4

Here you are.

http://pastebin.com/DMLZFpsZ
Reply
#5

Hmm.. actually, I don't see anything wrong.
The problem is the one at OnPlayerSpawn, right?
Try change
pawn Code:
INI_ParseFile(CharacterPath(playerid), "LoadCharacter_data", .bExtra = true, .extra = playerid);
to
pawn Code:
INI_ParseFile(CharacterPath(playerid), "LoadCharacter_%s", .bExtra = true, .extra = playerid);
Also I need more informations.. (sorry)
Write codes for /Characters/%s.ini --> INI_WriteInt, etcetera.
How your /Characters/%s.ini looks like --> Just copy paste what's inside there.

p.s: Before all your write codes for /Characters/%s.ini, try putting:
pawn Code:
INI_SetTag(YOUR_FILE_HERE, "data");
Reply
#6

I tried it but it still doesn't load the integers.

Do you think the '_' could be problematic in the saved file names?

Here's the saving system
http://pastebin.com/sXhL9sux

A part from the saved file:
characters/Kei_Isuzu.ini
Code:
[data]
cName = Kei_Isuzu
cUser = Awide
cRace = 2
cSex = 1
cSkin = 141
cSkin2 = 0
cSkin3 = 0
cSkin4 = 0
cSkin5 = 0
cSkin6 = 0
cCash = 100
cCheck = 2000
cBankCash = 400
Reply
#7

Bump, any ideas?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)