Complex coding leading to a HEAP error.

I’ve built a module with some complex coding that seems to be leading to a HEAP error.

I’m using a lot of “MoveOnMap” commands to update various pieces on the board when ever a card is moved to specific zones on each player’s board.

I created a Piece Prototype ‘Card’ and that Property has several other prototypes listed inside “Card_TrackerGeneral” and “Card_TrackerY”; Card_TrackerG; Card_TrackerR…

But when I turn off the Card_TrackerY/G/R versions it seems to work, but when turned on it crashes the entire module.

Anyone have suggestions on where my coding has gone completely off the rails and became Godzilla?

Here is the Progress Evolution of Technology Module to see all the coding and mess.
dropbox.com/s/box929fabchqv … .vmod?dl=0

Updated file… same issue.
dropbox.com/s/fjkgmacpvw5j4 … d.zip?dl=0

I think you’re running into the same issues that I’ve run into on previous versions of TBK …and pretty much the reason I abandoned them and have tried to make newer versions simpler.

The way I understand it, the game keeps an internal log so that players can “Undo” things that occur if a mistake is made. Very complex coding generates a very large internal undo file very quickly. This eats up memory at an incredible rate. I couldn’t find my original posting on the subject but I remember that all I had to do was operate a complex combat computer, that I had developed, about half dozen times and the game became completely non-functional.

It was suggested at the time that perhaps someone could right a script that would write the log outside the game as a separate file and, therefore, wouldn’t eat up memory but I don’t think anyone has stepped up to the plate on that one.

What did you do to get around that?

I made one prototype for all cards that evaluated each of the local and global properties and changed those that needed changed. Which is really nice because I didn’t have to code each card. And it works… except that you can’t save the game state or close the module after a while. :frowning:

This was my third iteration of the code, which is streamlined a bunch. I’m not as excited to breakup the code for each card/card type. Or I’ll just have to remove 90% of the automation. (Maybe I could make a single player version that only needs the code for one player. Thoughts?