I'm looking for errors in my scripts but I need to find Where the function is called from
Example:
function A (string) -- print(Where the function is called from) print(string) end A("Hello")
In this case, it would print something like: "Function A got called from line 7" When an error occurs, it shows where the function, if there are functions called each others, is called from.
Anybody know? Thanks.
For anyone who would like to do this: I found it, you need to do:
print(debug.traceback())
Thanks for reading and tried to help anyways :)