PDA

View Full Version : MySQL Problem


CoaPsyFactor
20/06/2012, 09:30 PM
Hello there,

I have this strange error, when I load vehicles on Windows server it works fine, but when I try to load them on Linux server, it doesn't make them ok.

Here is code, you'll see there is debug(); in this query, and on windows it prints that like this:
[23:34:29] 525 2771.810058 -1624.890014 10.812299 271.278015 1 32 900, but on Linux it prints some strange characters in model:
[23:35:58] 554 -./,),(-*,(.(((((( 2771.610107 -1620.550048 11.007399 0 0 900


case THREAD_LOAD_VEHICLES:
{
mysql_store_result();
new carloadline[512], registracija[32], engine, lights, alarm, doors, bonnet, boot, objective,vCarID;
while(mysql_fetch_row_format(carloadline, "|"))
{
sscanf(carloadline, "p<|>e<idddddffffdddddddds[24]dfddddddddddddddddddddddddddddddddddddddddddddd>", CarLoadInfo);
vCarID = AddStaticVehicleEx(CarLoadInfo[clModel], CarLoadInfo[clLocX], CarLoadInfo[clLocY], CarLoadInfo[clLocZ], CarLoadInfo[clAngle], CarLoadInfo[clColor1], CarLoadInfo[clColor2], CarLoadInfo[clRespawnDelay]);
debug("%d %f %f %f %f %d %d %d", CarLoadInfo[clModel], CarLoadInfo[clLocX], CarLoadInfo[clLocY], CarLoadInfo[clLocZ], CarLoadInfo[clAngle], CarLoadInfo[clColor1], CarLoadInfo[clColor2], CarLoadInfo[clRespawnDelay]);
VehicleInfo[vCarID][vID] = CarLoadInfo[clID];
VehicleInfo[vCarID][vModel] = CarLoadInfo[clModel];
VehicleInfo[vCarID][vType] = CarLoadInfo[clType];
VehicleInfo[vCarID][vSiren] = CarLoadInfo[clSiren];
VehicleInfo[vCarID][vUsage] = CarLoadInfo[clUsage];
VehicleInfo[vCarID][vUsedFor] = CarLoadInfo[clUsedFor];
VehicleInfo[vCarID][vLocX] = CarLoadInfo[clLocX];
VehicleInfo[vCarID][vLocY] = CarLoadInfo[clLocY];
VehicleInfo[vCarID][vLocZ] = CarLoadInfo[clLocZ];
VehicleInfo[vCarID][vAngle] = CarLoadInfo[clAngle];
VehicleInfo[vCarID][vColor1] = CarLoadInfo[clColor1];
VehicleInfo[vCarID][vColor2] = CarLoadInfo[clColor2];
VehicleInfo[vCarID][vRespawnDelay] = CarLoadInfo[clRespawnDelay];
VehicleInfo[vCarID][vFaction] = CarLoadInfo[clFaction];
VehicleInfo[vCarID][vJob] = CarLoadInfo[clJob];
VehicleInfo[vCarID][vLocked] = CarLoadInfo[clLocked];
VehicleInfo[vCarID][vInt] = CarLoadInfo[clInt];
VehicleInfo[vCarID][vViwo] = CarLoadInfo[clViwo];
strmid(VehicleInfo[vCarID][vOwner], CarLoadInfo[clOwner],0, strlen(CarLoadInfo[clOwner]), 24);
VehicleInfo[vCarID][vSpawned] = CarLoadInfo[clSpawned];
VehicleInfo[vCarID][vehHealth] = CarLoadInfo[clHealth];
VehicleInfo[vCarID][vPanels] = CarLoadInfo[clPanels];
VehicleInfo[vCarID][vDoors] = CarLoadInfo[clDoors];
VehicleInfo[vCarID][vehLights] = CarLoadInfo[clLights];
VehicleInfo[vCarID][vTires] = CarLoadInfo[clTires];
VehicleInfo[vCarID][vLock] = CarLoadInfo[clLock];
VehicleInfo[vCarID][vAlarm] = CarLoadInfo[clAlarm];
VehicleInfo[vCarID][vImobilizator] = CarLoadInfo[clImobilizator];
VehicleInfo[vCarID][vFuel] = CarLoadInfo[clFuel];
VehicleInfo[vCarID][vSecurity] = CarLoadInfo[clSecurity];
VehicleInfo[vCarID][vTuned] = CarLoadInfo[clTuned];
VehicleInfo[vCarID][vNeon] = CarLoadInfo[clNeon];
VehicleInfo[vCarID][vNumberPlate] = CarLoadInfo[clNumberPlate];
VehicleInfo[vCarID][vPaintJob] = CarLoadInfo[clPaintJob];
VehicleInfo[vCarID][vSpoiler] = CarLoadInfo[clSpoiler];
VehicleInfo[vCarID][vHood] = CarLoadInfo[clHood];
VehicleInfo[vCarID][vRoof] = CarLoadInfo[clRoof];
VehicleInfo[vCarID][vSkirt] = CarLoadInfo[clSkirt];
VehicleInfo[vCarID][vLamps] = CarLoadInfo[clLamps];
VehicleInfo[vCarID][vNitro] = CarLoadInfo[clNitro];
VehicleInfo[vCarID][vExhaust] = CarLoadInfo[clExhaust];
VehicleInfo[vCarID][vWheels] = CarLoadInfo[clWheels];
VehicleInfo[vCarID][vStereo] = CarLoadInfo[clStereo];
VehicleInfo[vCarID][vHydraulics] = CarLoadInfo[clHydraulics];
VehicleInfo[vCarID][vFrontBumper] = CarLoadInfo[clFrontBumper];
VehicleInfo[vCarID][vRearBumper] = CarLoadInfo[clRearBumper];
VehicleInfo[vCarID][vVentRight] = CarLoadInfo[clVentRight];
VehicleInfo[vCarID][vVentLeft] = CarLoadInfo[clVentLeft];
VehicleInfo[vCarID][vTimesDestroy] = CarLoadInfo[clTimesDestroy];
VehicleInfo[vCarID][vGPS] = CarLoadInfo[clGPS];
VehicleInfo[vCarID][vMelee] = CarLoadInfo[clMelee];
VehicleInfo[vCarID][vWeap1] = CarLoadInfo[clWeap1];
VehicleInfo[vCarID][vWeap2] = CarLoadInfo[clWeap2];
VehicleInfo[vCarID][vAmmo1] = CarLoadInfo[clAmmo1];
VehicleInfo[vCarID][vAmmo2] = CarLoadInfo[clAmmo2];
VehicleInfo[vCarID][vDrug][0] = CarLoadInfo[clDrugSlot1];
VehicleInfo[vCarID][vDrug][1] = CarLoadInfo[clDrugSlot2];
VehicleInfo[vCarID][vDrug][2] = CarLoadInfo[clDrugSlot3];
VehicleInfo[vCarID][vDrug][3] = CarLoadInfo[clDrugSlot4];
VehicleInfo[vCarID][vDrug][4] = CarLoadInfo[clDrugSlot5];
VehicleInfo[vCarID][vDrugCode][0] = CarLoadInfo[clDrugSlot6];
VehicleInfo[vCarID][vDrugCode][1] = CarLoadInfo[clDrugSlot7];
VehicleInfo[vCarID][vDrugCode][2] = CarLoadInfo[clDrugSlot8];
VehicleInfo[vCarID][vDrugCode][3] = CarLoadInfo[clDrugSlot9];
VehicleInfo[vCarID][vDrugCode][4] = CarLoadInfo[clDrugSlot10];
VehicleInfo[vCarID][vTokiVoki] = CarLoadInfo[clTokiVoki];

VehicleInfo[vCarID][vFuel] = 100;
vCanDrive[vCarID] = 1;
vEngine[vCarID] = OFF;
vLights[vCarID] = 0;
VehicleInfo[vCarID][vBonnets] = 0;
sVehHealth[vCarID] = VehicleInfo[vCarID][vehHealth];
VehicleInfo[vCarID][vTrunk] = 1;

VehicleInfo[vCarID][vFuel] = 100;
VehicleInfo[vCarID][vehHealth] = 1000;
if(IsABike(GetVehicleModel(vCarID)) || IsATrain(GetVehicleModel(vCarID)) || IsAPlane(GetVehicleModel(vCarID)))
{
GetVehicleParamsEx(vCarID,engine,lights,alarm,door s,bonnet,boot,objective);
SetVehicleParamsEx(vCarID,VEHICLE_PARAMS_ON,VEHICL E_PARAMS_OFF,alarm,doors,VEHICLE_PARAMS_OFF,VEHICL E_PARAMS_OFF,objective);
}
else
{
GetVehicleParamsEx(vCarID,engine,lights,alarm,door s,bonnet,boot,objective);
SetVehicleParamsEx(vCarID,VEHICLE_PARAMS_OFF,VEHIC LE_PARAMS_OFF,alarm,doors,VEHICLE_PARAMS_OFF,VEHIC LE_PARAMS_OFF,objective);
}
LinkVehicleToInterior(vCarID, VehicleInfo[vCarID][vInt]);
SetVehicleVirtualWorld(vCarID, VehicleInfo[vCarID][vViwo]);

if(VehicleInfo[vCarID][vNumberPlate] == 0)
SetVehicleNumberPlate(vCarID, "None");
else
{
format(registracija, sizeof(registracija), "%d", VehicleInfo[vCarID][vNumberPlate]);
SetVehicleNumberPlate(vCarID, registracija);
}
}
debug("MySQL Report: Vehicles Loaded !\n");
mysql_free_result();
}