SA-MP Forums Archive
Y_ini use - 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 use (/showthread.php?tid=545284)



Y_ini use - Banditukas - 07.11.2014

Hi,

I don't really well understand toturial, of ******, and other what i see. Because there is a lot of examples showen and i don't understand some of them. Maybe who can show me how to load a data from file when gamemode is loading, and then safe that things.


Re: Y_ini use - M4D - 07.11.2014

to load data use "INI_ParseFile".
for example i want to parse a file in "/users/admin.ini"
pawn Код:
INI_ParseFile("users/admin.ini", "YourLoadFunction", .bExtra = false, .extra = 0);
and making load function:
pawn Код:
forward YourLoadFunction(name[], value[]);
public YourLoadFunction(name[], value[])
{
    INI_Int("IntValue",/*Variable that data load into it*/); // <~~~~ Loading integer
    INI_String("StrValue",/*Variable that data load into it*/,/*String Size*/); // <~~~~ Loading string
    //...... load other....
    return 1;
}



Re: Y_ini use - Banditukas - 07.11.2014

INI_ParseFile("users/admin.ini", "YourLoadFunction", .bExtra = false, .extra = 0);

.bExtra = false what i mean? name[] value?

forward YourLoadFunction(name[], value[]);
public YourLoadFunction(name[], value[])
{
INI_Int("IntValue",/*Variable that data load into it*/); // <~~~~ Loading integer
INI_String("StrValue",/*Variable that data load into it*/,/*String Size*/); // <~~~~ Loading string
//...... load other....
return 1;
}


Re: Y_ini use - Banditukas - 07.11.2014

forward YourLoadFunction(name[], value[]);

What is using name[] and value[]


Re: Y_ini use - Sabur - 07.11.2014

Quote:
Originally Posted by ******
Посмотреть сообщение
Could you be more specific about what in the tutorials you don't understand? If I know exactly where you get lost I can improve that section, otherwise all you are asking is for people to repeat the information in the tutorials in a different way - and there is no guarantee that this alternate way will be any better.
INI_Int("Name", Variable.)

Example:

INI_Int("Health", PlayerInfo[playerid][pHealth])


Re: Y_ini use - Banditukas - 07.11.2014

How to create a new .ini file?


Re: Y_ini use - Banditukas - 07.11.2014

How to load in simplest way?


Re: Y_ini use - Banditukas - 08.11.2014

Код:
error 017: undefined symbol "name"
error 017: undefined symbol "value"

INI_Load("test.ini");
    new SCORE;
    INI_Bin("SCORE", SCORE );
    
    printf("%d", SCORE );

I get these errors in ini_bin



Re: Y_ini use - Banditukas - 08.11.2014

UP>..


Re: Y_ini use - Banditukas - 09.11.2014

Why i get these errors?