Require same module in many scripts (SOLVED)

I have module like:

local u = {}
u.table = {“a”, “b”,“c”}
return u

in beginning of script “A.script”: local u = require “u”
in init: modify(u.table)

and in beginning of script “B.gui_script”: local u = require “u”, and then in some function of B use(u.table)

but in use(u) u does not have modifications from script A; do variables ‘u’ inited by require in different scripts point to the same table or not ? (stackoverflow says that in lua it should be the same table, but it seems not the case in defold) When instead of using u in script B I posted message to script A to do what I intented to do in B, it worked as intened (u was modified).

In your example u would be the same table in both script A and script B. Would you mind posting a minimal example (A.script, B.script and the module) so that I can take a look?

Sorry, this bug was gone after rebuild. O_o

2 Likes