Get function information in Lua

Asked

Viewed 45 times

2

How could I have information about global functions in a file. moon?

function showAll(arg1, arg2)
    return print(arg1, arg2)
end

Type, have information on arguments, etc.

  • the documentation lua https://www.lua.org/pil/contents.html#1

  • here you can find more information about functions https://www.lua.org/pil/5.html

  • You have a great answer here https://stackoverflow.com/questions/11907169/global-function-in-lua

  • What problem do you want to solve with this information?

1 answer

0

A sample of how this is done:

En global.lua (where the global function is located) :

globalFunction1 = function(params)
    print("Eu sou globalFunction1")
end

the call of function, outrofile. :

globalFunction1(params)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.