[PROBLEM] INI:File
#1

Hi guys, i have a strange problem with saving files, im using y_ini and here is my example:

Код:
FUNCTION: SacuvajMarihuanu(idsadnice)
{
	new dFile[128];
	format(dFile, sizeof(dFile),"sadnice/Sadnica_%d.ini",idsadnice);
	new INI:File = INI_Open(dFile);
	INI_WriteInt(File,"Vrijeme",MI[idsadnice][sTime]);
	INI_WriteFloat(File,"X",MI[idsadnice][sX]);
	INI_WriteFloat(File,"Y",MI[idsadnice][sY]);
	INI_WriteFloat(File,"Z",MI[idsadnice][sZ]);
	INI_WriteFloat(File,"lpX",MI[idsadnice][slpX]);
	INI_WriteFloat(File,"lpY",MI[idsadnice][slpY]);
	INI_WriteFloat(File,"lpZ",MI[idsadnice][slpZ]);
        INI_Close(File);
	return 1;
}
The problem is on all this functions where i have opening and closing ini files, for some reason INI:File starts to be -1, and when i need to close that File i get
Код:
Accessing element at negative index -1
here is FUNCTION defined:
Код:
#define FUNCTION:%0(%1) \
		forward%0(%1); \
		public%0(%1)
EDIT #1:
If file does not exist it will not bug...
Reply


Messages In This Thread
[PROBLEM] INI:File - by Dusan01 - 06.02.2016, 07:48
Re: [PROBLEM] INI:File - by Mencent - 06.02.2016, 08:53
Re: [PROBLEM] INI:File - by Dusan01 - 06.02.2016, 09:20
Re: [PROBLEM] INI:File - by Dusan01 - 06.02.2016, 10:01

Forum Jump:


Users browsing this thread: 1 Guest(s)