Jump to content
  • 0

How can I make my Script not finish?


Pandita7u7

Question

8 answers to this question

Recommended Posts

Loop it.

Example:

function main()
local menu = gg.choice({"Menu 1", "Exit"}, nil, "Test Loop")
if menu == 2 then os.exit() end
end

while true do
main()
end

 

 

Link to comment
Share on other sites

2 hours ago, maulz said:

Loop it.

Example:


function main()
local menu = gg.choice({"Menu 1", "Exit"}, nil, "Test Loop")
if menu == 2 then os.exit() end
end

while true do
main()
end

 

 

By doing that, it works, but I can not get out of the menu. The only way out is to cancel, but I want the menu to be open while I'm not using it

Link to comment
Share on other sites

45 minutes ago, Pandita7u7 said:

By doing that, it works, but I can not get out of the menu. The only way out is to cancel, but I want the menu to be open while I'm not using it

while true do
  if gg.isVisible() then
    gg.setVisible(false)
    main()
  end
end

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.