Creating a Namespace In Lua Across Files -


if want have several files in same namespace/table, need check if table has been defined? in otherwords table:

testns = {} 

something like:

if(nil == testns)     testns = {} end 

i new lua if there alternative, let me know.

the idiom is

testns = testns or {} 

Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -