[y_ini] Reading from a tag. - 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: [y_ini] Reading from a tag. (
/showthread.php?tid=328057)
[y_ini] Reading from a tag. -
Antonio144 - 23.03.2012
Hello.
I recently started using y_ini. I made a house system (using
this tutorial as a reference)
I made its so that a house is identified by its name that is set in a [tag] saved in houses.ini file. In that tag is house information.
eg
pawn Код:
//houses.ini file
[house1]//name of the house set as a tag
Owner = Antonio144
Locked = 1
[house2]
Owner = random_dude
locked = 0
For reading houses.ini file i have this
pawn Код:
INI:houses[house1](name[], value[], playerid)
{
INI_String("Owner", HouseInformation[houseid][Owner], 20);
INI_Int("Locked", HouseInformation[InHousePU[playerid]][Locked]);
return 0;
}
That, of course, reads only from a "house1" tag. I need tag name to be dynamic.
House name is stored like this
pawn Код:
HouseInformation[InHousePU[playerid]][Hname]
I tried putting it instead of "house1" but i got loads of errors
I have read
How to use y_ini and
y_ini - Fast INI file reading and writing.
Is there a solution?
Thank you.
Re: [y_ini] Reading from a tag. -
Antonio144 - 24.03.2012
Edit:nvm