You must be logged in to post messages.
Please login or register

Modding and Scripting
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Debugging RM scripts
posted 21 July 2021 05:33 PM EDT (US)   
Hello again,

I've delved deeper into the AoM modding and wanted to check how RM scripts worked.

I used trial-and-error to transform Anatolia into a "kinda" new map, but I found out that sometimes when loading the map (and more typically 4+ players) the game flat out crashes instead of the "failed to load xyz" error message.

So I wanted to know what are some of the techniques to debug and pinpoint the faulty lines of code. I tried using the debugging console in-game but it seems to crash at different places (if at all) at random so it's imprecise. I also tried using the loading bar progress as an indicator but it feels really clunky.

Any tips to debug the sometimes-crashing RM scripts?
Replies:
posted 24 July 2021 06:48 AM EDT (US)     1 / 1  
I tend to comment out lines of code that I recently added until the problem fixes itself. For crashes I think these are some of the reasons:

* Strings being too long - threshold is a little over 120 characters
* Calling a method that does not exist
* Accidentally assigning in an if statement instead of checking equals (This stops script execution rather than crash to desktop)
* Forgetting to set a critical piece of information such as the map size
* There seems to be crash that occurs in some situations when water types beautify - in particular seems to be non sea based ones that place objects such as greek river. I don't know the cause - someone claimed to me it had something to do with depth of it.
Age of Mythology Heaven » Forums » Modding and Scripting » Debugging RM scripts
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames