Board Thread:Scribunto Help/@comment-3175093-20190721154910

Hallo,

I have created a LUA module to produce a compound number from a time duration in seconds.

As a next step, I created a template and it's documentation where I invoked the LUA module.

The examples I wrote in the documentation look as if they work with no problems and no errors.

The next think, I have tried to do was to import, through "require": local BT = require("Module:BT").main in a new LUA Module. After this, I tried to call the first module in the new Module by writing: BT(71) The result of the above code should be "1 m 11 s".

But instead of this I get the error: Lua error in Module:BT at line 10: attempt to index local 'frame' (a number value). Backtrace: Module:BT:10: in function "BT" Module:BuildingLevels:43: in function "chunk" mw.lua:430: in function "chunk" [C]: ? link to screenshot

Because I am new in LUA Module coding I have no idea how to fix this. Can someone help me out with it? Thanks in advance for any help!