SA-MP Forums Archive
y_ini loading objects problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: y_ini loading objects problem (/showthread.php?tid=580005)



y_ini loading objects problem - maximthepain - 01.07.2015

Hello, i'm trying to load some objects using y_ini..which is saved to a file using y_ini.. however when i'm loading them and creating them, they doesn't apear in-game. (However values are there in the file)

The Loading:
Код:
INI_Load("Objects.ini");
for(new idx = 1; idx < sizeof(ObjInfo); idx++)
{
	if(ObjInfo[idx][oModel])
	{
		ObjInfo[idx][obj] = CreateDynamicObject(ObjInfo[idx][oModel], ObjInfo[idx][oX], ObjInfo[idx][oY], ObjInfo[idx][oZ], ObjInfo[idx][oRX], ObjInfo[idx][oRY], ObjInfo[idx][oRZ]);
	}
}
Help me fix this so they will be loaded right.


Re: y_ini loading objects problem - Suicidal.Banana - 01.07.2015

You dont appear to be defining ObjInfo, and you dont appear to be waiting for the ini to load.
Read this documentation, it describes how you need a function named similar to the ini file to handle the data of it once it has actually loaded.


Re: y_ini loading objects problem - maximthepain - 01.07.2015

Found how to fix it, thanks!


Re: y_ini loading objects problem - Suicidal.Banana - 01.07.2015

Always a pleasure