Is there a way to unload a .lua file that you loaded with require?
ie: json = require("json")
I have a big problem in that I have two files that contain similar functions that get loaded when a user chooses Option A or Option B.
If they choose B and then go back and choose A, the wrong function which has the same name gets called, because the first file is still in memory.
Any help greatly appreciated!
* I tried the following but the wrong lua module is staying in memory.
if package.loaded[startup] ~= nil then startup = nil package.loaded[startup] = nil end