Y_INI Problem
#3

By ******:

Quote:
INI_Int
name[] - Name of the INI textual identifier.
variable - Variable to store to.

Macro to ease the loading of integers from INI files. Data is passed to the loading callback as a string, this will convert it to an integer (using sscanf if possible, normal functions if not) and save in the given variable. First checks that the name of the data passed matches the given name. Note that for this macro to work the variables MUST be called "name" and "value".
Examples:

Save an integer:
pawn Код:
INI:filename[tag](name[], value[])
{
    INI_Int("LEVEL", gLevel);
}
Save an integer for a player (assuming you used a matching INI_Load call):
pawn Код:
INI:filename[tag](playerid, name[], value[])
{
    INI_Int("PLAYER_LEVEL", gLevel[playerid]);
}
Reply


Messages In This Thread
Y_INI Problem - by Rock_Ro - 02.07.2011, 22:40
Re: Y_INI Problem - by Rock_Ro - 03.07.2011, 10:01
Re: Y_INI Problem - by Sasino97 - 03.07.2011, 10:09

Forum Jump:


Users browsing this thread: 1 Guest(s)