Module - Why doesn't this work?

File 1: main.lua

require "ourModule";

print(variableFromModule);

File2: ourModule.lua

module(..., package.seeall);

variableFromModule = "variable placed on module";

... it doesn't print the variable from the module. I'm guessing it works differently to say including a file in php?

Thanks

Tom

you need ourmodule = require("ourmodule")

views:1286 update:2011/9/28 8:56:32
corona forums © 2003-2011