What does"bad argument #2 to 'get_height' (RenderScriptInstance expected, got userdata)" mean? (SOLVED)

In my gameobject script I tried to get my window height but it returns an error with this message

render.get_height() is something you can only use in your render script file. You can make a Lua module and set a value in its to the render.get_height() value and then include that module in your GO script files to share the data.

Check out in this example how the fixed_aspect_ratio.render_script file includes the render_helper.lua, how it sets values within it, and how .script files also include the render_helper.lua file and retrieve stored values within it.

2 Likes

thanks