19.08.2011, 13:06
Okay, it works, thanks.
Next Problem. In OnGameModeInit I load my Cars.
mysql_query("SELECT * FROM `autos`");
mysql_store_result();
new query[256];
new RID, ID, mid,col1,col2,schild[20]; new Float
,Float:y,Float:z,Float:angle,sp;
new vehicleid = 0;
new str[256];
while(mysql_fetch_row(str, "|"))
{
sscanf(str, "p<|>iiiiis[256]{i}{i}ffff{i}{i}iiiiiiiiiiiiiii",RID,ID,mid,col1,c ol2,schild,x,y,z,angle,sp,Tuning[vehicleid][Hood],Tuning[vehicleid][Roof],Tuning[vehicleid][Sideskirt],Tuning[vehicleid][Lamps],Tuning[vehicleid][Nitro],Tuning[vehicleid][Exhaust],Tuning[vehicleid][Wheels],Tuning[vehicleid][Stereo],Tuning[vehicleid][Hydraulics],Tuning[vehicleid][FrontBumper],Tuning[vehicleid][RearBumper],Tuning[vehicleid][VentRight],Tuning[vehicleid][VentLeft],Tuning[vehicleid][Paintjob]);
ID = CreateVehicle(mid,x,y,z,angle,col1,col2,0);
//blubb
In this loop i dont use mysql_store_result, only one time before.
But then, when the first vehicle is loaded, i become an error:
[15:03:20] [MySQL] Error (0): Function: mysql_store_result called when no result stored.
The loop breaks and the next things load (Houses etc.)
Next Problem. In OnGameModeInit I load my Cars.
mysql_query("SELECT * FROM `autos`");
mysql_store_result();
new query[256];
new RID, ID, mid,col1,col2,schild[20]; new Float

new vehicleid = 0;
new str[256];
while(mysql_fetch_row(str, "|"))
{
sscanf(str, "p<|>iiiiis[256]{i}{i}ffff{i}{i}iiiiiiiiiiiiiii",RID,ID,mid,col1,c ol2,schild,x,y,z,angle,sp,Tuning[vehicleid][Hood],Tuning[vehicleid][Roof],Tuning[vehicleid][Sideskirt],Tuning[vehicleid][Lamps],Tuning[vehicleid][Nitro],Tuning[vehicleid][Exhaust],Tuning[vehicleid][Wheels],Tuning[vehicleid][Stereo],Tuning[vehicleid][Hydraulics],Tuning[vehicleid][FrontBumper],Tuning[vehicleid][RearBumper],Tuning[vehicleid][VentRight],Tuning[vehicleid][VentLeft],Tuning[vehicleid][Paintjob]);
ID = CreateVehicle(mid,x,y,z,angle,col1,col2,0);
//blubb
In this loop i dont use mysql_store_result, only one time before.
But then, when the first vehicle is loaded, i become an error:
[15:03:20] [MySQL] Error (0): Function: mysql_store_result called when no result stored.
The loop breaks and the next things load (Houses etc.)