27.01.2015, 17:49
hello guys
all works fine all garages save in mysql database but i can't load garages
0 garages loaded in server_log
sorry for my bad english
all works fine all garages save in mysql database but i can't load garages
0 garages loaded in server_log
pawn Код:
stock Load_Garages() //Loads all garages
{
garageCount = 0; //Make a debug garage
new sql[128];
new i;
mysql_query(mysql, "SELECT * FROM `garages`");
mysql_store_result();
while(mysql_fetch_row(sql))
{
sscanf(sql, "e<p<|>s[24]dddfffdd>", gInfo[i]);
UpdateGarageInfo(i);
garageCount++;
i++;
}
mysql_free_result();
printf("[jGarage]: Loaded %i garages.",garageCount); //The debug garage isn't a real garage, so we take 1 away
garageCount++; //To prevent overwriting/not detecting of garages
#if AUTOSAVE == true
SetTimer("Save_Garages",AUTOSAVE_INTERVAL*1000,true); //Start the autosave timer if enabled
#endif
}