Code:
warning 213: tag mismatch
warning 213: tag mismatch
error 032: array index out of bounds (variable "Group")
warning 213: tag mismatch
error 032: array index out of bounds (variable "Group")
Code:
enum ginfo
{
grname[255],
leader,
active
};
new Group[MAX_PLAYERS][pginfo];
Code:
stock LoadGroups()
{
new FileName[128];
for(new i = 0; i < MAX_GROUPS; i++)
{
format(FileName, sizeof(FileName), "Groups/Group_%d.ini", i);
if(fexist(FileName)) // If the file exists...
{
Group[i][grname] = dini_Get(FileName, "grname"); // We use dini_Get because it is a string.
Group[i][leader] = dini_Int(FileName, "leader"); // We use dini_Int because it is an (int)eger.
Group[i][active] = dini_Int(FileName," active");
printf("[system] Group %d spawned.", i);
}
}
return 1;
}