06.02.2016, 07:48
(
Последний раз редактировалось Dusan01; 06.02.2016 в 09:58.
)
Hi guys, i have a strange problem with saving files, im using y_ini and here is my example:
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
here is FUNCTION defined:
EDIT #1:
If file does not exist it will not bug...
Код:
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;
}
Код:
Accessing element at negative index -1
Код:
#define FUNCTION:%0(%1) \ forward%0(%1); \ public%0(%1)
If file does not exist it will not bug...


