28.03.2011, 18:50
This code crashes my OnGameModeInit. I have no idea what's wrong with it, but any help would be appreciated.
pawn Код:
public LoadVehicleExtras()
{
printf("Loading Vehicle Extras...");
new resultline[300];
mysql_query("SELECT * FROM `vehicle_extras` ORDER BY `model` ASC");
mysql_store_result();
new modelid;
new tmpmodel;
new arr[4];
while(mysql_fetch_row(resultline)==1)
{
if(!sscanf(resultline, "p<|>a<i>[4]", arr))
{
modelid = arr[0];
if(modelid < 400) continue;
tmpmodel = modelid-400;
VehicleExtraInfo[tmpmodel][vxModel] = modelid;
VehicleExtraInfo[tmpmodel][vxBasePrice] = arr[1];
VehicleExtraInfo[tmpmodel][vxMaxTrunks] = arr[2];
VehicleExtraInfo[tmpmodel][vxMaxSold] = arr[3];
}
else
{
print("Error: There was a problem parsing vehicle extra data! Moving to next result.");
}
}
mysql_free_result();
return 1;
}