Jump to content
  • 0

I finished writing the script with the function and gg.multiChoice but when I start the script tells me : script finished. What should I do?


QuarkYT

Question

function mainmenu ()

 mainmenu = gg.choice ({

  ' Subscribe to Quark ThoNos ',

  ' Other Menu ', 

  ' exit '},' Quark ThoNos')

  

  if mainmenu == 1 then tosubscriber () end

  if mainmenu == 2 then other6 () end

  if mainmenu == 3 then exit () end

end 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

function mainmenu ()

local mainmenu = gg.choice ({

  ' Subscribe to Quark ThoNos ',

  ' Other Menu ', 

  ' Exit '},nil,' Quark ThoNos')

  if mainmenu == nil then gg.toast("Canceled") os.exit() end

  if mainmenu == 1 then tosubscriber () end

  if mainmenu == 2 then other6 () end

  if mainmenu == 3 then exit () end

end

function tosubscriber()
gg.alert("Please subscribe to Quark ThoNos.")
end

function other6()
gg.alert("Go to Other Menu...???")
end

function exit()
gg.alert("The script will exit now...duh.")
os.exit()
end

while true do
if gg.isVisible(true) then
mainmenu()
end
end

like this.

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.