Y_ini use
#1

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

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

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;
}
Reply
#4

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

What is using name[] and value[]
Reply
#5

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])
Reply
#6

How to create a new .ini file?
Reply
#7

How to load in simplest way?
Reply
#8

Код:
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
Reply
#9

UP>..
Reply
#10

Why i get these errors?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)