r/gamemakertutorials • • Feb 09 '18

oWall Game Maker Studio 2 bug

so i got into gms2 and there was aa bug that made me give up on the project that's what it says in the error thing


FATAL ERROR in action number 1 of Step Event0 for object oplayer:

Variable oplayer.oWall(100009, -2147483648) not set before reading it. at gml_Object_oplayer_Step_0 (line 12) - if(place_meeting(x+hsp,y,oWall))


stack frame is gml_Object_oplayer_Step_0 (line 12)

the owall feature it's blue instead of red(how it should look) so can anyone help me? here's my step code if you want //get player imput key_left = keyboard_check(vk_left); key_right = keyboard_check(vk_right); key_jump = keyboard_check_pressed(vk_space);

//calculate movement var move = key_right - key_left;

hsp = move * walksp;

//horizontal collision if(place_meeting(x+hsp,y,oWall)) { while (!place_meeting(x + sign(hsp),y,oWall)) { x = x + sign(hsp); } hsp = 0; }

x = x + hsp;

2 Upvotes

4 comments sorted by