Y_ini - 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 (
/showthread.php?tid=530145)
Y_ini -
Sarra - 05.08.2014
hey it's my first time using Y_ini, so I tried the first example found in the Y_ini tutorial and suprisingly when I compile the compiler stops working (..has stopped working" message)
pawn Код:
new
// The name of the file, can be any string variable or literal.
fileToWrite[] = "mine.INI",
// "INI_Open" returns a variable with tag "INI".
INI:iniFile = INI_Open(fileToWrite);
//
// y_ini supports tags, that is:
//
// [tag]
// key = value
//
INI_SetTag(iniFile, "examples");
// Write an integer value with the key "some_integer" under the current tag:
INI_WriteInt(iniFile, "some_integer", 42);
// Now close the current file:
INI_Close(iniFile);
which I found here
https://sampforum.blast.hk/showthread.php?pid=1138420#pid1138420
I also tried to write my own y_ini code myself but I got the same problem
Re: Y_ini -
Champ - 05.08.2014
I think ****** is showing some examples in his thread on how to use y_ini. If you are looking to make something like a register system using Y_ini. You can check this url:
https://sampforum.blast.hk/showthread.php?tid=273088
Re: Y_ini -
[XST]O_x - 05.08.2014
You didn't put the functions (INI_Open, INI_SetTag...) under any callback... Of course it'd crash.
pawn Код:
new INI:iniFile;
public OnGameModeInit()
{
iniFile = INI_Open("mine.INI");
INI_SetTag(iniFile, "examples");
INI_WriteInt(iniFile, "some_integer", 30);
INI_Close(iniFile);
return 1;
}
That should work.
Re: Y_ini -
Sarra - 05.08.2014
How would I know , I just started learning this -_-, thanks alot
Re: Y_ini -
[XST]O_x - 05.08.2014
Quote:
Originally Posted by Sarra
How would I know , I just started learning this -_-, thanks alot
|
Well, that is basically how you learn.
Re: Y_ini -
Sarra - 05.08.2014
thanks alot, it works
![Wink](images/smilies/wink.png)
+rep