Dini to Y_ini, public Load()
#1

I have a problem.. I want to use this because dini makes my server lag alot. I'm using it for a car system, the thing is, when I edit the files with Y_ini it makes it Model = 522 instead of Model=522. After this the cars are not loading, maybe because I just don't get it how to convert LoadCar to Y_ini. Maybe the problem is another, in any case I need your help in this.

There's my code, thanks in advance


Код:
public LoadCar()
{
	new file[26];
	for(new idx = 1; idx < sizeof(CarInfo) ; idx++)
	{
	    format(file, sizeof(file),"Cars/%d.ini", idx);
		if(dini_Exists(file))
		{
		 	CarInfo[idx][tModel] = dini_Int(file,"Model");
			CarInfo[idx][tLocationx] = dini_Float(file,"Locationx");
			CarInfo[idx][tLocationy] = dini_Float(file,"Locationy");
			CarInfo[idx][tLocationz] = dini_Float(file,"Locationz");
			CarInfo[idx][tAngle] = dini_Float(file,"Angle");
			CarInfo[idx][tColorOne] = dini_Int(file,"ColorOne");
			CarInfo[idx][tColorTwo] = dini_Int(file,"ColorTwo");
			strmid(CarInfo[idx][tOwner], dini_Get(file,"Owner"), 0, strlen(dini_Get(file,"Owner")), 255);
			CarInfo[idx][tOwned] = dini_Int(file,"Owned");
			CarInfo[idx][tLock] = dini_Int(file,"Lock");
			CarInfo[idx][tPaintjob] = dini_Int(file,"Paintjob");
			CarInfo[idx][tOwnable] = dini_Int(file,"Ownable");
			CarInfo[idx][tFaction] = dini_Int(file,"Faction");
			CarInfo[idx][tAlarm] = dini_Int(file,"Alarm");
			CarInfo[idx][tInsured] = dini_Int(file,"Insured");
			CarInfo[idx][tPrice] = dini_Int(file,"Price");
			CarInfo[idx][tLicensePlate] = dini_Int(file,"LicensePlate");
		}
	}
	print("[SCRIPT]: Loaded Cars");
	return 1;
}
Reply
#2

Anyone ?
Reply
#3

Relly now, can someone give me an example how to turn this into Y_ini ? Because I can't read the files changed by Y_ini because is writing a space before and after "=".
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)