[HELP] Y_ini string loading.
#1

Hello,
I'm using INI_ParseFile to load int/strings from the userfile.

That's how I'm loading:
PHP код:
    if(!strcmp(name,"Owned")) { HouseInfo[h][hOwned] = strval(value); } 
The integers are loading fine, but this:
PHP код:
    if(!strcmp(name,"HouseName")) { HouseInfo[h][hName] = strval(value); }
    if(!
strcmp(name,"Owner")) { HouseInfo[h][hOwner] = strval(value); } 
aren't load and become to N/A.
How should I load the strings?

Thanks advance.
Reply
#2

you can load strings using INI_String

Код:
	INI_String("HouseName",HouseInfo[h][hName], 24);
	INI_String("Owner",HouseInfo[h][hOwner], 24);
EDIT:
also make sure you that u added string size for HouseInfo[h][hName] and HouseInfo[h][hOwner]
example
Код:
new
  HouseInfo[MAX_HOUSES][Owner][24],
  HouseInfo[MAX_HOUSES][Name][64];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)