08.07.2012, 22:14
Basically, when creating the for loop to load the businesses it loads the first record and then stops completely.
Here is the code:
Any help would be appreciated.
Here is the code:
pawn Код:
stock loadbusiness()
{
new Query[500];
format(Query, sizeof(Query), "SELECT * FROM `businessinfo`");
mysql_query(Query);
mysql_store_result();
for(new i = 1; i != mysql_num_rows(); i++)
{
if(i <= mysql_num_rows())
{
LoadBusinessInfo(i);
format(Query, sizeof(Query), "SELECT * FROM `businessinfo` WHERE `bid` = %d", i);
businesspickup[i] = CreatePickup(1272, 1, BVar[businessid[i]][bpickupx], BVar[businessid[i]][bpickupy], BVar[businessid[i]][bpickupz], 0);
print(Query);
currbusiness++;
}
}
print("Buinesses Loaded");
return 1;
}