I'm making a metatable that returns in error in SciTE, however, I need to know the line number it was called in to actually have it seem like a true error.
a = {"a"}
v = {"v"}
setmetatable(a, v)
setmetatable(v, {__metatable = "lua: tables:lua:1: Metausage required"})
getmetatable(v)
..if anyone wants to know what 'Metausage' is, it's a secret. ;D
"lua: tables:lua:x:"
Is there a way I can change 'x' to 5 (the line number getmetatable(v) was used), without actually having to write the number itself? |