07.05.2016, 22:20
So I'm converting a group system into MySQL, and I have this function (that is calling correctly, I have checked that.)
The issue is, it is not loading the GroupName, at least it isn't when I display the group dialog. It won't show up and I have to set it again. I checked the database and it saves in there, which means I believe it to be a loading issue.
Any thoughts? (REP+)
pawn Код:
public InitiateGroups()
{
new rows, row, fields, number[25];
cache_get_data(rows, fields);
while(row < rows)
{
cache_get_field_content_int(row, "GroupType", Group[row][GroupType]);
cache_get_field_content(row, "GroupName", Group[row][GroupName], 256);
cache_get_field_content(row, "MOTD", Group[row][GroupMOTD], 256);
for(new i = 0; i != MAX_GROUP_RANKS; ++i)
{
format(number, sizeof number, "Rank%i", i);
cache_get_field_content(row, number, GroupRankNames[row][i], 256);
}
for(new i = 0; i != MAX_GROUP_RANKS; ++i)
{
format(number, sizeof number, "RankPay%i", i);
cache_get_field_content_int(row, number, Group[row][GroupPaycheque][i]);
}
for(new i = 0; i != 6; ++i)
{
format(number, sizeof number, "Div%i", i);
cache_get_field_content(row, number, GroupDivisionNames[row][i], 256);
}
row++;
}
switch(row)
{
case 0: printf("[SCRIPT-LOAD/ERR] The script initiated 0 groups.", row);
default: printf("[SCRIPT-LOAD] The script has initiated %d groups", row);
}
}
Any thoughts? (REP+)