Sorry, we don't support your browser.  Install a modern browser

Unkeyed values of lua-generated UI causes the XML to fail silently#1976

The Problem: Unkeyed values in the attributes table of lua-generated UI causes the XML to fail to build and it doesn’t throw an error.

Background: When creating UI through code, I stumble onto the issue. Suddenly my UI didnt display at all and there where no errors in the log. On further inspection of my recent changes, I noticed that I missed a key in an attributes list:

{ tag = “Text”, attributes = { “name_”..i}} - missing key
{ tag = “Text”, attributes = { id = “name_”..i}} - what I wanted to type

Only attributes seem to have this issue.

Attached is a lua-script to reproduce this bug. The relevant line is commented.

If UI like this should not build, then please add an error message, otherwise please fix the issue. Thank you.

a year ago