Creating a Lua Popup

  • Something like this:


    Code
    1. local function Main(display_handle,argument) -- we need this display_handle
    2. -- ...
    3. local question = "What do you like on your pizza?"
    4. local toppings = {"Pineapple", "Pepperoni", "Mushroom"}
    5. local choice = PopupInput(question, display_handle, toppings);
    6. Echo( "You choose : %d", choice ) -- You choose : 0
  • Ok one more question, my menu is now working and I tryed the following to get a function to the menupoints:

  • Close, Cmd is a function so it needs zero or more parameters in parentheses.


    Undo is just here for example, though for some reason it doesn't work exactly the way I would have expected, still learning myself.

  • But you´re pretty good and help me a lot!!! Now I tryed to put a Menu inside a Menu. :D But gMA 3 dosen´t like it.

    when I execute this, the following Error appears, you know why?

    Code
    1. MainTask 14m39.683s : ===== Menu Started =====
    2. MainTask 14m40.953s : OK:Call Plugin 2
    3. LUA 14m42.072s : LUA API Syntax error at :22
    4. LUA 14m42.072s : PopupInput ( [string:title],UIcaller:lightuserdata,table:{{'str'|'int'|'lua'|'handle', name, type-dependent}...}[,string:selectedValue[,integer:x,integer:y]] ) returns string:value