Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

when i die in the fights i get this error:

A topic by M1MlL created Nov 21, 2023 Views: 300 Replies: 4
Viewing posts 1 to 4

___________________________________________

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

ERROR in

action number 1

of  Step Event0

for object oBattle:

Push :: Execution Error - Variable Index [0] out of range [0] - -7._possibleTargets(100102,0)

 at gml_Script_anon____struct___20____struct___19_gml_GlobalScript_GameData_5293____struct___20____struct___19_gml_GlobalScript_GameData (line 243) -                      var _target = _possibleTargets[irandom(array_length(_possibleTargets)-1)];

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

gml_Script_anon____struct___20____struct___19_gml_GlobalScript_GameData_5293____struct___20____struct___19_gml_GlobalScript_GameData (line 243)

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

gml_Object_oBattle_Step_0 (line 1) - battleState();

I get this error as well. It also happens to me when I defeat all the enemies. Do you get that error too?

yes

It's because the game undergoes an integer overflow as the code in the lecture file has not yet been added to the video series. The paid file includes the full lecture. I would recommend budgeting for it first, and upon buying it to use it as a back up file in case any modifications to your file goes wrong, for example adding a new feature. Name it something like "OriginalBackupSourceBattleSystem".  I'd rather have us learning than get frustrated waiting for lecture videos. 

bruh