PDA

View Full Version : MYSQL problem... +rep


simo0000
27/01/2015, 05:49 PM
hello guys
all works fine all garages save in mysql database but i can't load garages
0 garages loaded in server_log


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
}

sorry for my bad english ;)

ShiffeyTheGamer
27/01/2015, 05:53 PM
Create a garage in the server

simo0000
27/01/2015, 05:55 PM
Create a garage in the server
already and saved in the mysql database but can't load them!

simo0000
27/01/2015, 06:53 PM
help

Rabea
27/01/2015, 06:57 PM
type this under OnGameModeInIt

Load_Garages()

simo0000
27/01/2015, 07:04 PM
type this under OnGameModeInIt

Load_Garages()


already bro :/ plz help me guys