[y_ini] Reading from a tag.
#1

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.
Reply
#2

Edit:nvm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)