Jump to content
g1doz

how to set multi function in one function

Recommended Posts

how to set multi function in one function

example

function fly_hack()
menu = gg.choice{"fly 1","fly 2","fly 3")","Back")
if not menu then home() end
if menu==1 then fly_1() end
if menu==2 then fly_2() end
if menu==3 then fly_3() end
if menu==6 then home() end
end

function fly_1()

end

function fly_2()

end

function fly_3()

end

i want to set this all function fly_hack and fly 1 2 3 in  one function how ?

Share this post


Link to post
Share on other sites

Functions are objects of the first class. Learn lua. You cannot “set” functions. This is nonsense.
Before calling a function, you must declare / create it.

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...