gui.get_user_choice(): fixed a 'number expected, got function' error
This commit is contained in:
parent
8e8d9a3c8f
commit
603430c3aa
2 changed files with 3 additions and 2 deletions
|
@ -8,6 +8,7 @@
|
|||
### Editor
|
||||
### Multiplayer
|
||||
### Lua API
|
||||
* Fixed an error in `gui.get_user_choice()` (part of PR #6247).
|
||||
### Packaging
|
||||
### Terrain
|
||||
### Translations
|
||||
|
|
|
@ -35,8 +35,8 @@ function gui.get_user_choice(attr, options)
|
|||
msg[k] = attr[k]
|
||||
end
|
||||
for k,v in ipairs(options) do
|
||||
table.insert(msg, wml.tag.option, { message = v,
|
||||
wml.tag.command, { wml.tag.lua, {
|
||||
table.insert(msg, wml.tag.option { message = v,
|
||||
wml.tag.command { wml.tag.lua {
|
||||
code = string.format("gui.__user_choice_helper(%d)", k)
|
||||
}}})
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue