Jump to content
QuarkYT

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?

Recommended Posts

Posted (edited)

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 

Edited by QuarkYT

Share this post


Link to post
Share on other sites

Obviously call your function.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Call your function...

mainmenu()  <-- add this to the last line.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...