SA-MP Forums Archive
[HELP] Y_ini string loading. - 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: [HELP] Y_ini string loading. (/showthread.php?tid=295932)



[HELP] Y_ini string loading. - BlackSA - 08.11.2011

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.


Re: [HELP] Y_ini string loading. - HuSs3n - 08.11.2011

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];