Unfortunately, you cannot learn about functions in Lua - they accept any number of parameters by design. Without the opportunity to look at the sources, your only resort is documentation and / or other samples.
The most you can do in this case is to recursively translate the entire table _G and unload each table / function, print the results to a file.
โAn error usually leads to a desktop crashโ is a sign of a very poor design - a good API should tell you that it expects A, and you passed B. For example, in Lqt , binding Qt to Lua, we check each parameter for source Qt API so that the programmer is notified of errors:
> QApplication.setFont(1, 2) QApplication::setFont(number, number): incorrect or extra arguments, expecting: QFont*,string,.
Michal kottman
source share