23.01.2010, 09:12 
	
	
	
		Hello, i am trying to make a car mod saving system (it's in my vehicle 'streamer').
There is a problem with the code in practice (the compiler throws up 0 errors and 0 warnings)
Please note: Vcolour1 and Vcolour2 are declared
using print() markers i found out that the code does not format the string right, no matter what mods the car has the string is "0 0 0 0 0 0 0 0 0 0"
what further confuses me is that this code worked before I added
Thank you for your time
	
	
	
	
There is a problem with the code in practice (the compiler throws up 0 errors and 0 warnings)
Код:
SaveMods(vehid)
{
	new modelstr[5],str[256];
	new nos,hyd,spoil,wheels,rscoop,exhaust,rbumper,fbumper;
 	format(modelstr,sizeof(modelstr),"%i",vehid);
	nos = GetVehicleComponentInSlot(vehid, CARMODTYPE_NITRO);
	hyd = GetVehicleComponentInSlot(vehid, CARMODTYPE_HYDRAULICS);
	spoil = GetVehicleComponentInSlot(vehid, CARMODTYPE_SPOILER);
	wheels = GetVehicleComponentInSlot(vehid, CARMODTYPE_WHEELS);
	rscoop = GetVehicleComponentInSlot(vehid, CARMODTYPE_ROOF);
	exhaust = GetVehicleComponentInSlot(vehid, CARMODTYPE_EXHAUST);
	rbumper = GetVehicleComponentInSlot(vehid, CARMODTYPE_REAR_BUMPER);
	fbumper = GetVehicleComponentInSlot(vehid, CARMODTYPE_FRONT_BUMPER);
	format(str,256,"%i %i %i %i %i %i %i %i %i %i",nos,hyd,spoil,wheels,rscoop,exhaust,rbumper,fbumper,Vcolour1[vehid],Vcolour2[vehid]);
	dini_Set(MODFILE,modelstr,str);
}
using print() markers i found out that the code does not format the string right, no matter what mods the car has the string is "0 0 0 0 0 0 0 0 0 0"
what further confuses me is that this code worked before I added
Код:
rscoop = GetVehicleComponentInSlot(vehid, CARMODTYPE_ROOF); exhaust = GetVehicleComponentInSlot(vehid, CARMODTYPE_EXHAUST); rbumper = GetVehicleComponentInSlot(vehid, CARMODTYPE_REAR_BUMPER); fbumper = GetVehicleComponentInSlot(vehid, CARMODTYPE_FRONT_BUMPER);



