[HELP] MXINI AND ENUM ERROR - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] MXINI AND ENUM ERROR (
/showthread.php?tid=263057)
[HELP] MXINI AND ENUM ERROR -
-=Dark=- - 20.06.2011
Hello I'm writing a house system and use the enum to enumerate the parameters of the house and read them MXIni of the file. But I have a problem:
this code enum:
PHP код:
enum hInfo
{
hName[255],
hPrice,
<...>
};
This code is read parameters from file:
PHP код:
new string[512];
format(string,sizeof(string),HouseDir,ID);
new iniFile = ini_openFile(string);
ini_getString(iniFile,"Name",HouseInfo[ID][hName]);// The problem here
ini_getInteger(iniFile,"Price",HouseInfo[ID][hPrice]);
<...>
ini_closeFile(iniFile);
and when I try to take the title in Create3DTextLabel, the name does not appear.
MXIni not write text read into a variable
HouseInfo[ID][hName], while all other values (numeric), it handles well.
Prompt: how to fix this problem? How to make the text read MXIni written into this variable? Thanks in advance.