Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

lena102

2
Posts
1
Topics
A member registered Apr 06, 2023

Recent community posts

Thanks so much for the help, really appreciate it! Just got a moment to debug as suggested with breakpoints on the AI script, and it confirms the issue--"actions" is undefined each time before a crash. (Screenshot attached). It's strange because, again, it defines itself just fine for several turns before something goes wrong. I'll keep messing around in debug and see what I can find!

Hi Shaun! Thanks so much for your work on this project--I've been watching the YouTube releases and have found the source code incredibly helpful as I follow along and learn from how you've built these systems!

I realize that you are unlikely to respond to every dummy like me who is struggling with implementing the code, but as I suspect many others will also be trying to mesh this project with elements from your ARPG series, I thought starting a thread might be helpful in case anyone else comes across this particular issue. I have been getting the following error message:

############################################################################################

ERROR in

action number 1

of  Step Event0

for object oBattle:

Variable <unknown_object>.actions(100162, 0) not set before reading it.

 at gml_Script_anon____struct___19____struct___18_gml_GlobalScript_GameData_5117____struct___19____struct___18_gml_GlobalScript_GameData (line 238) -                      var _action = actions[0];

############################################################################################

gml_Script_anon____struct___19____struct___18_gml_GlobalScript_GameData_5117____struct___19____struct___18_gml_GlobalScript_GameData (line 238)

gml_Script_BattleStateSelectAction_gml_Object_oBattle_Create_0 (line 188) -                             var _enemyAction = _unit.AIscript();

gml_Object_oBattle_Step_0 (line 1) - battleState();

_______

Running version IDE v2023.2.1.75.

The crash happens when the enemy acts using the AI function, as the message says, and the first enemy encounter is never affected. It's only happening during subsequent encounters--after escaping from the enemy and fighting it again, while fighting other instances of the same enemy type, or after leaving the test room and returning to battle the respawned defeated enemy a second time. Even then, it's inconsistent in when it happens; sometimes the AI will work fine for a turn or two before crashing. I will also occasionally receive errors like the above, only referencing seemingly random objects in my test room (prop objects--trees and whatever with nothing on them but collision) rather than the <unknown_object> as above. Occasionally the error message will instead be the "trying to index a variable which is not an array" message. All other aspects of the battle have been working fine. 

Clearly something is going wrong with the enemy action array, but with the exception of changing names and sprites, mine is copied directly from the source code. Would be interested to see if anyone else has had a similar issue, and if so, what thoughts might be on what could be causing it. I might just be an idiot. I would be very glad to be told I am if it means a fix!