r/gamemaker • u/GracieGrace4092 • 6d ago
Resolved Turn-Based Combat Tutorial Issue?
I'm following this tutorial on setting up a turn-based combat, but I keep getting the following error code:
___________________________________________
############################################################################################
ERROR in action number 1
of Step Event0 for object obj_battle:
Variable <unknown_object>.effectOnTaret(100084, -2147483648) not set before reading it.
at gml_Script_BattleStatePerformAction@gml_Object_obj_battle_Create_0 (line 97) - if (currentAction.effectOnTaret == MODE.ALWAYS) || ( (currentAction.effectOnTarget == MODE.VARIES) && (array_length(currentTargets) <= 1) )
############################################################################################
gml_Script_BattleStatePerformAction@gml_Object_obj_battle_Create_0 (line 97)
gml_Object_obj_battle_Step_0 (line 1) - battleState();
I'm pretty new to game maker and coding in general, but I've gone over the video multiple times trying to figure out why it's saying unknown object.
EDIT: Coding with dyslexia is horrible. I've just misspelled things everywhere lol.
View all comments
Show parent comment
1
u/GracieGrace4092 6d ago
Now I'm getting
############################################################################################
ERROR in action number 1
of Step Event0 for object obj_battle:
Variable struct.cell(100018, -2147483648) not set before reading it.
at gml_Script_anon@314@___struct___2@___struct___1@GameData (line 17) - var _damage = cell(_user.strength + random_range(-_user.strength + 0.25, _user.strength * 0.25));
############################################################################################
gml_Script_anon@314@___struct___2@___struct___1@GameData (line 17)
gml_Script_BattleStatePerformAction@gml_Object_obj_battle_Create_0 (line 112) - currentAction.func(currentUser, currentTargets);
gml_Object_obj_battle_Step_0 (line 1) - battleState();
Is that another typo thing??? I can't for the life of me find anything spelled wrong