22.07.2017, 16:10
thanks worked, but now I have 1 more problem
the problem is that [0] = clanid 1 and [1] = clanid 7
I want the 'i' to be the clanid
PHP Code:
forward tLoadClans();
public tLoadClans()
{
new rows, fields, str[128];
cache_get_data(rows, fields);
if(rows)
{
for(new i = 0; i < rows; i++)
{
ClanDB[i][ClanID] = cache_get_field_content_int(i, "clanid");
cache_get_field_content(i, "clan_name", ClanDB[i][ClanName]);
ClanDB[i][ClanLevel] = cache_get_field_content_int(i, "clan_level");
ClanDB[i][ClanEXP] = cache_get_field_content_int(i, "clan_exp");
ClanDB[i][ClanMaxEXP] = cache_get_field_content_int(i, "clan_max_exp");
ClanDB[i][ClanColor] = cache_get_field_content_int(i, "clan_color");
format(str, sizeof(str), "[%d] clanid: %d, exp: %d, max exp: %d",i, ClanDB[i][ClanID], ClanDB[i][ClanEXP], ClanDB[i][ClanMaxEXP]);
printf(str);
}
}
}
PHP Code:
[0] clanid: 1, exp: 0, max exp: 0
[1] clanid: 7, exp 0, max exp: 300
I want the 'i' to be the clanid