18.08.2015, 15:20
(
Последний раз редактировалось arvifilter; 18.08.2015 в 22:57.
)
Quote:
Add this line
Код:
printf("Handle ID:%d",_:handle); Код:
#define INI_ERR_FAILED_TO_OPEN -1 #define INI_ERR_FILE_DOES_NOT_EXIST -2 #define INI_ERR_FILE_ALREADY_EXISTS -3 #define INI_ERR_FILE_CREATION_FAILED -4 #define INI_ERR_MAX_FILE_LIMIT -5 #define INI_ERR_INVALID_HANDLE -6 #define INI_ERR_SYNTAX -7 #define INI_ERR_INVALID_ID -8 #define INI_ERR_INVALID_BOOL -9 #define INI_ERR_PARSING_FAILED -17 #define INI_SECTION_NOT_FOUND -10 #define INI_KEY_CREATE_FAILED -11 #define INI_SECTION_CREATED -12 #define INI_SECTION_CREATE_FAILED -13 #define INI_KEY_CREATED -14 #define INI_KEY_NOT_FOUND -15 #define INI_KEY_FOUND -16 By default you can have a maximum of 2 active handles. You need to close the previous handle to make a free handle. You can increase the number of handles by redefining INI_MAX_MULTI_FILES Код:
#define INI_MAX_MULTI_FILES 128 //Your number of handles |
When I added Section it got working, but then I'm facing another problem:
I'm trying to write some stuff in a file but it keeps duplicating the section which causes problem on loading
Код:
new Path[30]; format(Path,30,"/Bizz/%d.ini",id); new INI:bizzh = INI::CreateINI(Path); CreatePickup(1239,1,xxa,yya,zza,0); INI::WriteFloat(bizzh,xxa,"X","data"); INI::WriteFloat(bizzh,yya,"Y","data"); INI::WriteFloat(bizzh,zza,"Z","data"); INI::WriteInteger(bizzh,type,"Type","data"); INI::CloseINI(bizzh);
Код:
[data] X=2246.384521 [data] Y=53.340953 [data] Z=26.667125 [data] Type=1
I'd be very happy if you could help me out
Thanks in advance.