18.08.2013, 22:48
Hello, is looping through a Y_INI tag possible?
Here is what I want to achieve:
For example in the .ini file:
I want to do a check through each one of the value of the tag (there are 5).
The questions:
1. How do I know there are 5 values under the [exampletag]?
2. How do I write a function loop that does something like this:
If you don't understand it, tell me, I will try to explain it.
Here is what I want to achieve:
For example in the .ini file:
pawn Код:
[exampletag]
blabla1 = 1 //1
blabla2 = 0 //2
blabla3 = 1 //3
blabla4 = 1 //4
blabla5 = 1 //5
The questions:
1. How do I know there are 5 values under the [exampletag]?
2. How do I write a function loop that does something like this:
pawn Код:
enum exampletag
{
blabla1,
blabla2,
blabla3,
blabla4,
blabla5
};
new BlaBlaInfo[MAX_PLAYERS][exampletag];
for (new i; i < sizeof(exampletag); i++)
{
if (BlaBlaInfo[playerid][i] == 1)
{
// code
}
}