LuaRendering better error messages
Posted: Sun Nov 03, 2019 12:14 am
When working with LuaRendering i often get a bit frustrated at the "unfiltered" error messages, for example:
Now...which one of the arguments is "#3"? By counting the parameters from top to bottom in the doc:
So it would be kinda nice if the messages contained some more information. (Or at least mention somewhere in the doc how argument numbers map to documented arguments (i guess it's the count of mandatory args?)).
Have a nice weekend.
Code: Select all
bad argument #3 of 3 to 'draw_text' (number expected, got table)
So..it's probably the position? But why does it say "number expected" then.Table with the following fields:
text :: LocalisedString: The text to display.
surface :: SurfaceSpecification
target :: Position or LuaEntity
So it would be kinda nice if the messages contained some more information. (Or at least mention somewhere in the doc how argument numbers map to documented arguments (i guess it's the count of mandatory args?)).
Have a nice weekend.