I know my post title is a bit strange, so please see below explanation:
While working on my game yesterday there was no issue with my "train AI", everything was working as intended.
Today, I removed some print functions that I used for bug testing in the AI, specifically one reference called "$theobjects". This reference is used within the script, albeit multiple lines later. To my knowledge, I only removed the print functions. While testing, the train AI proceeded to ignore any reference to "$theobjects", it was only after I added the print function back that it worked properly. I recently read about memory management and "garbage collection" in programming and realized the engine may be removing the reference from memory as the engine believes it is no longer needed.
Is my assumption correct? If so, how strict is the engine when it comes to removing references/memory management? I do not believe this is a bug, I think I either made a mistake or failed to account for memory management. (The game works fine with my workaround so this isn't urgent either.)
Just trying to gain knowledge/perspective, and hopefully any answers can assist future RPGIAB users.
😎