A few clarifications regarding tables and removeSelf

Totally. I agree, I am still a bit of stickler. One thing for me though, if I have a gameState global, I like to keep them tidy by stuffing them into a global table like: 

_gameState = {}

  _gameState.player = “not loaded”

  _gameState.background = “not initialized”

  _gameState.firstloaded = true

  _gameState.Talk=false

  _gameState.gameState = “main menu”

  _gameState.npcActionTakingPlace = false

  _gameState.console={}

  _gameState.console[1]="…"

  _gameState.howManyMoves=0

  

Super easy to save out as a data json file in event of systemEvent makes returning to them super smooth in some cases.

re:declared vars, I know right?  At least it’s keeping my CoronaBuild-2866 still active during memory testing. :D 

ditch 2866, just grab Niklas Frykholm’s GLOBAL_lock from here (or strict.lua for 5.1, if you prefer)

@Lava Level  – I’m often actually doing the exact same thing: using one global gameData table with fields like “isUserActive”, “gameLocation” etc. for easy saving purposes. ;)  

@davebollinger – This is brilliant!