Self-Referencing in INI

edited May 2013 in Help request
[Object]
Graphic = TileTexture
Position = (-400., -320., -0.)
Repeat = (10., 10., 0.)
Scale = @.Repeat

It works as expected, but generates messages on Console:

[CONFIG] [orxConfig.c:orxConfig_SelectSection():3778] Failed to create config section with parameters (, 0, 0).
[CONFIG] [orxConfig.c:orxConfig_SelectSection():3778] Failed to create config section with parameters (, 0, 0).

The expected behavior is for Scale to have value of Repeat in the same section and it does.

Comments

  • edited May 2013
    I'm actually very surprised that it works when written like this. :)

    Also the error log states that there might be issue with properties further down in your config file as the parser is now confused.

    The proper way of writing it would be:
    [Object]
    Repeat = (10, 10, 0)
    Scale = @Object.Repeat
    
Sign In or Register to comment.