16.06.2018, 07:16
so here is the code
So there's a problem with the loop I guess..
PHP код:
mysql_format(Database, DB_Query, sizeof(DB_Query),"INSERT INTO `RANKS` (`ID`) VALUES ('%d')",listitem+1);
mysql_tquery(Database, DB_Query);
for(new i; i < MAX_FACTIONS_DIVS; i++)
{
for(new j; j < MAX_FACTIONS_RANK; j++)
{
mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `RANKS` SET `D%dR%d`='Undefined' WHERE `ID`='%d'", i+1,j,listitem+1);
mysql_query(Database, DB_Query);
/*format(key, sizeof(key),"Rank%d",j);
rank = GetRanksEnum(key);
format(iGroupRank[listitem+1][i][rank],128,"Undefined");*/
}
}
mysql_format(Database, DB_Query, sizeof(DB_Query),"INSERT INTO `divisions` (`ID`) VALUES ('%d')",listitem+1);
mysql_tquery(Database, DB_Query);
for(new x; x < MAX_FACTIONS_DIVS; x++)
{
format(key, sizeof(key),"DIV_%d",x+1);
mysql_format(Database, DB_Query, sizeof(DB_Query), "UPDATE `divisions` SET `%s`='Undefined' WHERE `ID`='%d'", key,listitem+1);
mysql_query(Database, DB_Query);
/*iGroupDivs[listitem+1][x] = "Undefined";*/
}
So there's a problem with the loop I guess..