• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows What did i do wrong?

N

nilsbd

Guest
okay so i just did this code

/// @desc Type Text
get_input();
var actionHold = keyboard_check(vk_space);

// Check if we need more characters
if (characters < message_length) {
characters += message_speed+action_hold;

// Copy string to the current character
message_draw = string_copy(message[message_current], 0, characters)
} else { // Once we have finished adding the characters
if (actionKey) {
// Check if there are more messages
if (message_current < message_end) { // Start the next message
message_current += 1;
message_length = string_length(message[message_current]);
characters = 0;
message_draw = "";
} else {
// destroy the object
instance_destroy();
}
}
}

and i cant start the game cause it says that


___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object obj_textbox:

Variable obj_textbox.action_hold(100046, -2147483648) not set before reading it.
at gml_Object_obj_textbox_Step_0 (line 7) - characters += message_speed+action_hold;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_textbox_Step_0 (line 7)

i didnt find anything wrong at line 7 which is:
characters += message_speed+action_hold;
please help me find the problem
 

TsukaYuriko

☄️
Forum Staff
Moderator
You didn't declare action_hold. You did declare actionHold, though. Decide on a common naming convention and stick with it throughout the entire project. This will automatically lead to a reduced occurrence rate of such mishaps.
 
N

nilsbd

Guest
You didn't declare action_hold. You did declare actionHold, though. Decide on a common naming convention and stick with it throughout the entire project. This will automatically lead to a reduced occurrence rate of such mishaps.
thanks now i see! :)
 
Top