#1

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

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

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

How would I know , I just started learning this -_-, thanks alot
Reply
#5

Quote:
Originally Posted by Sarra
Посмотреть сообщение
How would I know , I just started learning this -_-, thanks alot
Well, that is basically how you learn.
Reply
#6

thanks alot, it works +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)