I've been pulling my hair for quite some time now trying to figure out whats wrong.
I've got a dialog in my script that won't show. I've checked a lot of other scripts with dialogs and the one in my script is working just like those but it won't show.
I also have a bit of trouble with return values from the LM.GUI.ALERT_WARNING at line 128, I don't think I'm using the right code there.
Could both problems be related?
Any help would be very appriciated!
the script
-david
Help needed, dialog
Moderators: Víctor Paredes, Belgarath, slowtiger
Ok, I've solved the first issue. Don't know what was wrong, I rewrote the whole dialog code from scratch and now it works.
But the ALERT_WARNING still doesn't work.
LM.GUI.ALERT_WARNING issue:
In the Scripting reference LM states "After the user clicks a button in the laert box, the function returns 0, 1, or 2, depending if the user pressed button 1, 2, or 3."
But I cant find anything on how to use those values, nor can I find any script using more than one button.
the code I have is;
-david
But the ALERT_WARNING still doesn't work.
LM.GUI.ALERT_WARNING issue:
In the Scripting reference LM states "After the user clicks a button in the laert box, the function returns 0, 1, or 2, depending if the user pressed button 1, 2, or 3."
But I cant find anything on how to use those values, nor can I find any script using more than one button.
the code I have is;
This is obviously not the right code. How should it look?LM.GUI.Alert(LM.GUI.ALERT_WARNING, "Warning text", "warning line 2", nil, "OK", "CANCEL", nil)
if LM.GUI.ALERT_WARNING == 0 then
print ("ok")
elseif LM.GUI.ALERT_WARNING == 1 then
print ("cncl")
break
end
-david