Naomi , the “talking to myself” bit was not a cry so much as noticing I’m answering my threads right away. As per usual with past-midnight threads I do figure out a solution, usually right after posting.
(I specifically remember your super-thread on super-globals!)
The problem was, as mentioned, that Corona runs a check on any included modules before progressing forward, so I had to move all of my tables before my includes. I’ve seen a lot of Corona code examples that put includes first but that will no longer be the case for me.
Speaking globals theory…
I think that Corona is probably using the same upwards lookup it uses for locals vs. globals. That is, when I look for the variable “funtime” and the only one running is _G.funtime, it goes with that. But check this out:
[code]-- in main.lua
_G.funtime = 73
_G.salsa = 1000
local tacotime = require “tacotime.lua”
– in tacotime.lua
salsa = 1234
– test funtime
print(funtime) – 73
funtime = funtime + 2
print(funtime) – 75
– test salsa
print(salsa) – 1234
print(_G.salsa) – 1234[/code]
Basically, Corona can’t distinguish between normal and super globals. Once you set _G.salsa, you can no longer make a seperate instance of salsa unless it’s local. So no, you don’t need to specify _G after the 1st time. Nifty.
Jeff , that’s a phenomenal idea. I think I’ll go with that and see how long it works out. I’m not really sure what you mean by JSON coding (I haven’t done any of that yet, not sure if it’s needed) but yeah, I can’t see anything preventing that from working with sqlite or some other method of saving. [import]uid: 41884 topic_id: 19836 reply_id: 77041[/import]