Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser.Param fails if block/section has a period in it #10

Closed
knightzac19 opened this issue Jul 6, 2016 · 3 comments
Closed

Parser.Param fails if block/section has a period in it #10

knightzac19 opened this issue Jul 6, 2016 · 3 comments

Comments

@knightzac19
Copy link

Another small issue I found is that because you have it so that you can do block.key to get the key, if the block has a period in it , it fails to pull the key obviously. I am able to get around it by using your array method for the function.

So if I do

parser.param(["/script/shootergame.shootergamemode","MaxNumberOfPlayersInTribe"]);

it will work fine, but if I use the string way,

parser.param("/script/shootergame.shootergamemode.MaxNumberOfPlayersInTribe");

I'll get a lovely "shootergamemode" undefined error and such.

Here's the block/section that is causing the issue in my INI file.

[/script/shootergame.shootergamemode]
Ajnasz added a commit that referenced this issue Jul 6, 2016
Helps on Github ticket #10

Always the most specific block name will win:

if you search for config.param('foo.bar.baz')

[foo.bar.baz]

will win above

[foo.bar]
baz=qux

and above

[foo]
bar.baz = qux
Ajnasz added a commit that referenced this issue Jul 6, 2016
@Ajnasz
Copy link
Owner

Ajnasz commented Jul 6, 2016

Hey @knightzac19!

See the period-in-block-name branch for possible solutions.

Hope it helps.

@Ajnasz
Copy link
Owner

Ajnasz commented Jul 6, 2016

I also merged master into the branch, so you can test out with the other fixes made for your issue requests!

@knightzac19
Copy link
Author

That worked perfectly as well. You're on a roll today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants