If I misspell a function name (why I don’t like camellCase) or call something with any part of itself that no longer exists or have some off-code somewhere, then any portion of the game following that mistake won’t run and I’ll be left with a game where half the stuff is loaded and half isn’t. Worse yet I don’t know where the problem is, so I’m often looking through the entire doc if I don’t catch it early. To catch these I am often writing print(“runs to this point”) and transferring it around the code until it doesn’t run, at which point I know it’s the thing 1 line above. If using the scene system the declaration order is pretty particular and all over the place, and if the order is wrong the game won’t tell you problem is the table ur putting stuff in doesn’t exist, it’ll just not display half the objects. And an error in one object often shows up as an error in another that is written perfectly, it’s like stage objects with errors will close themselves and pretend to be fine while secretly casting the errors on the next object wherever it might dwell. scene:create() had a function call to add_foe() sitting on its own outside of everything else to generate a test foe, but it would generate a foe every frame…it took me a while to figureout a stage object using a since commented out object’s coordinates in its own table was the problem…that’s crazy mischevious behaviour, and no error messages in sight.
iDontExist(33,33,) --error
iDontExist(33,33) --no error..you don't exist tho so the game will freeze whatever bit comes after
iDontExist(...) --error!??! that's inconsistent
iDontExist(33,33,...) --error!??! that's inconsistent
This has proven to be extremely nefarious. Is there some kind of setting/thing I’m missing I can turn on to check for this stuff?
The error messaging only seems to catch certain things like you have a comma in the wrong place. I can’t remember which, but some of these ‘errors’ are legit in vanilla lua and other lua engines so I don’t know why they would generate errors in solar2d. But the comma example has its own rules, sometimes it allows a comma after a table entry…sometimes it doesn’t…really annoying inconsistencies, at least these generate errors though. I think it was the physics bodies when doing mult-bodies it doesn’t like an extra comma at the end of the final entry, but sprite system is fine with that extra comma…definitely ideal to let you write the extra comma from a commenting out perspective when the entries r long { {}, {}, } vs{ {}, {} }