Windows ERROR (IF Statement , or ) Expected)

C

Cole Clavey

Guest
I was coding and trying to create a title screen for my game and I was doing well, until I tried launching it, it will not allow me to run the game because of the error that states "ERROR at line 14 pos 2: Symbol , or ) expected.
The error is in an event coding script.
var move = 0;
move -= max(keyboard_check_pressed(vk_up),keyboard_check_pressed(ord("W")), 0);
move += max(keyboard_check_pressed(vk_down),keyboard_check_pressed(ord("S")), 0);

if (mov != 0)
{
mpos += move;
if (mpos < 0) mpos = array_length_1d(menu) = 1;
if (mpos > array_length_1d(menu) - 1) mpos = 0;
}

var push;
push = max(keyboard_check_released(vk_enter),keyboard_check_released(vk_shift, keyboard_check_released(vk_space), 0
if (push == 1) scr_menu();
 

AnonyMouse

Member
push = max(keyboard_check_released(vk_enter),keyboard_check_released(vk_shift), keyboard_check_released(vk_space), 0)
 
C

Cole Clavey

Guest
I tried running the game after I fixed a few mistakes and I tried running the game and a box appeared saying code error.
The code error said:

___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object Title___OB:

Variable Title___OB.fnt_options(100005, -2147483648) not set before reading it.
at gml_Object_Title___OB_DrawEvent_1 (line 3) - draw_set_font(fnt_options);
############################################################################################

The code it is referencing to is this bit of code:
draw_set_halign(fa_left);
draw_set_valign(fa_middle);
draw_set_font(fnt_options);
draw_set_color(c_white);

var m;
for (m = 0; m < array_length_1d(menu); m += 1)
{
draw_text(x + space, y + (m * space),string(menu[m]))
}

draw_sprite(sprite_index, 0, x + 16, y + mpos * space);
 

Cerno~b

Member
It looks like fnt_options is not defined, have you recently renamed, removed or moved it while fixing stuff?
 
Top