19.01.2014, 10:32
Okay so i am trying to load bans with the correct id. Now i have this code and theres 1 ban in the mysql database. The id of the ban is 1 and the console says Ban id 0 loaded. This is the code:
How come it doesnt say Ban 1 loaded. because thats the id of the ban.
pawn Код:
forward OnBansLoad();
public OnBansLoad()
{
new rows, fields;
cache_get_data( rows, fields, Handle);
if(!rows)
{
print("Bans table is empty, no results found.");
return 1;
}
new i = 0, id;
while(rows > i)
{
id = cache_get_row_int(i, 0);
BanVariable[id] = true;// You had only this, no loading any other
printf("Ban %d Loaded", id);
i++;
}
return 1;
}