SA-MP Forums Archive
Urgent Y_INI help.... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Urgent Y_INI help.... (/showthread.php?tid=271803)



Urgent Y_INI help.... - Skylar Paul - 26.07.2011

Honestly, this is beginning to piss me off. It's been three days since my first thread, and everyone just continuously "leaves me hanging" to use a less-than-intelligent phrase.

I have absolutely no fucking clue what the problem is, but here's the entire script..

http://pastebin.com/cWJ5JwFy

The problem lies within the Y_INI script, it's not loading anything correctly.. If someone could take a look at it and help me figure out what's wrong, that'd be like... perfect...


Re: Urgent Y_INI help.... - Skylar Paul - 26.07.2011

Bumping.. Need help ASAP as I can't do anything until this is fixed.


AW: Urgent Y_INI help.... - Nero_3D - 26.07.2011

I am only wondering why you use UserDataLoad_data since you never set any tag

Just use UserDataLoad only without the tag


Re: AW: Urgent Y_INI help.... - Skylar Paul - 26.07.2011

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
I am only wondering why you use UserDataLoad_data since you never set any tag

Just use UserDataLoad only without the tag
Sorry, this is my second day using Y_INI, so I have absolutely no idea what you're talking about.

Can you give me an example of what I used, and what I should have done?


AW: Urgent Y_INI help.... - Nero_3D - 26.07.2011

You used

pawn Код:
INI_ParseFile(uFile, "UserDataLoad_%s", .bExtra = true, .extra = playerid);
which means that you read the file uFile using the format "UserDataLoad_%s"

Because the bFileFirst flag isnt set the tag gets formated into "%s"

But you never used INI_SetTag so it means that the function which gets called is UserDataLoad_

Just use "UserDataLoad" as format so the function name is the same

pawn Код:
INI_ParseFile(uFile, "UserDataLoad", .bExtra = true, .extra = playerid);
pawn Код:
public UserDataLoad(playerid,name[],value[]) {}
or you set the correct tag before you write the data

pawn Код:
INI_SetTag(playerFile, "data");



Re: AW: Urgent Y_INI help.... - Skylar Paul - 26.07.2011

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
You used

pawn Код:
INI_ParseFile(uFile, "UserDataLoad_%s", .bExtra = true, .extra = playerid);
which means that you read the file uFile using the format "UserDataLoad_%s"

Because the bFileFirst flag isnt set the tag gets formated into "%s"

But you never used INI_SetTag so it means that the function which gets called is UserDataLoad_

Just use "UserDataLoad" as format so the function name is the same

pawn Код:
INI_ParseFile(uFile, "UserDataLoad", .bExtra = true, .extra = playerid);
pawn Код:
public UserDataLoad(playerid,name[],value[]) {}
or you set the correct tag before you write the data

pawn Код:
INI_SetTag(playerFile, "data");
Ohhh, thank you very much! Everything seems to be in working order now.