Here's the full function.
PHP Code:
transferToArray(name[], value[], num, bool:consistent)
{
static i;
if (strfind(name, "name") != -1) copy(RACE_NAMES[num], 19, value);
else if (strfind(name, "author") != -1) copy(RACE_AUTHORS[num], 19, value);
else if (strfind(name, "required_level") != -1) RACE_REQ_LEVEL[num] = str_to_num(value);
else if (strfind(name, "maximum_level") != -1) RACE_MAX_LEVEL[num] = str_to_num(value);
else if (strfind(name, "teamlimit") != -1) RACE_TEAM_LIMIT[num] = str_to_num(value);
else if (strfind(name, "numberofskills") != -1) RACE_NUM_SKILLS[num] = str_to_num(value);
else if (strfind(name, "allow_only") != -1) {
new arrIds[RACE_MAX_PRIVATE_ID][35], i;
util_explodeString(arrIds, RACE_MAX_PRIVATE_ID, 34, value, '|');
for (i = 0; i < RACE_MAX_PRIVATE_ID; i++) RACE_ALLOW_ONLY[num][i] = arrIds[i];}
else if (strfind(name, "numberoflevels") != -1) {
if (consistent) {
for (i = 0; i < RACE_MAXSKILLS; i++) RACE_SKILL_LEVELS[num][i] = str_to_num(value);
} else {
new arrIds[RACE_MAXSKILLS][3];
util_explodeString(arrIds, RACE_MAXSKILLS, 2, value, '|');
for (i = 0; i < RACE_MAXSKILLS; i++) RACE_SKILL_LEVELS[num][i] = str_to_num(arrIds[i]);
}
} else if (strfind(name, "skillnames") != -1) {
new arrIds[RACE_MAXSKILLS][20]; //<-- Why is this ok?
util_explodeString(arrIds, RACE_MAXSKILLS, 19, value, '|');
for (i = 0; i < RACE_MAXSKILLS; i++) RACE_SKILL_NAMES[num][i] = arrIds[i];
} else if (strfind(name, "skilldesc") != -1) {
new arrIds[RACE_MAXSKILLS][50]; //<-- Line 79, error.
util_explodeString(arrIds, RACE_MAXSKILLS, 49, value, '|');
for (i = 0; i < RACE_MAXSKILLS; i++) RACE_SKILL_INFO[num][i] = arrIds[i];
} else if (strfind(name, "skillreqlevel") != -1) {
new arrIds[RACE_MAXSKILLS][3];
util_explodeString(arrIds, RACE_MAXSKILLS, 2, value, '|');
for (i = 0; i < RACE_MAXSKILLS; i++) RACE_SKILL_REQ_LEVEL[num][i] = str_to_num(arrIds[i]);
}
}
My thought process is that if I'd already declared arrIds[] elsewhere in the code, the line right above 79 wouldn't work right.
*Edit
Bad indenting on here. Picture might be easier to read.