is SimpleDialog() crashing my code? - string "lolua: embedded Lua code"]:4: bad argument #1 to 'for iterator' (table exp
Posted: Thu May 01, 2025 7:30 pm
Hello, there is a common problem I'm noticing with writing scripts in Moho.
It seems like this line SimpleDialog() causes this problem:
I think this because when I run this debug check, everything runs smoothly until I try to create the dialog instance.
I don't know if this has something to do with my computer, or my code, but I've not just noticed this with my code, I've seen it with another.
What can I do?
This part of the software is supposed to create and display a dialog box where the user can enter some values.
I have searched online, on this forum, restarted MOHO several times, tried the script on different documents.
Nothing works.
It seems like this line SimpleDialog() causes this problem:
Code: Select all
[string "lolua: embedded Lua code"]:4: bad argument #1 to 'for iterator' (table expected, got nil)
Code: Select all
LM.GUI.Alert(LM.GUI.ALERT_WARNING, "this alert shows before error", nil, nil, "OK")
local dialog = LM.GUI.SimpleDialog()
LM.GUI.Alert(LM.GUI.ALERT_WARNING, "this does not show at all", nil, nil, "OK")
What can I do?
This part of the software is supposed to create and display a dialog box where the user can enter some values.
I have searched online, on this forum, restarted MOHO several times, tried the script on different documents.
Nothing works.