23.05.2012, 06:31
Im trying to read from a selected tag '[...]' w/o reading the previous or next information.
My main problem is the information should be stored in a variable/array as PlayerInfo[playerid][Level].
So i can't make two sections, since only the last section will give me actual values.
Im meaning like, if its the sitauation
Im loading this way:
INI_Load("playername.ini");
Then im not sure, but thats what im asking, if i'll load this way
INIlayername[char0](name[], value[])
INIlayername[char1](name[], value[])
{
PlayerInfo[playerid][Level] = ini_...
}
Only the last will be loaded since i loaded the whole file.
Its possible to use it this way?
switch(character)
{
case 0:
INIlayername[char0](name[], value[])
case 1:
INIlayername[char1](name[], value[])
}
This is possible? since it's must be the only way,
Here i need your suggestion
EDIT: I thought for a solution,
If i'll make a variable like this.
new LoadedCharacter[MAX_PLAYERS];
I'll be able easily to avoid loading unnecessary data from file.
INIlayername[char0](name[], value[])
{
if(LoadedCharacter[playerid] == 0)
{
//then loading..
}
}
Correctt?
My main problem is the information should be stored in a variable/array as PlayerInfo[playerid][Level].
So i can't make two sections, since only the last section will give me actual values.
Im meaning like, if its the sitauation
Im loading this way:
INI_Load("playername.ini");
Then im not sure, but thats what im asking, if i'll load this way
INIlayername[char0](name[], value[])
INIlayername[char1](name[], value[])
{
PlayerInfo[playerid][Level] = ini_...
}
Only the last will be loaded since i loaded the whole file.
Its possible to use it this way?
switch(character)
{
case 0:
INIlayername[char0](name[], value[])
case 1:
INIlayername[char1](name[], value[])
}
This is possible? since it's must be the only way,
Here i need your suggestion
EDIT: I thought for a solution,
If i'll make a variable like this.
new LoadedCharacter[MAX_PLAYERS];
I'll be able easily to avoid loading unnecessary data from file.
INIlayername[char0](name[], value[])
{
if(LoadedCharacter[playerid] == 0)
{
//then loading..
}
}
Correctt?