A
Adjud
Guest
Hi, I haven't used game maker since GM7, so I have a lot to catch up on. my problem is my game won't execute when I set global variables, this is the objcontroller create code I am using:
it keeps telling variable reference only once, then when I try to play the game it gives me the error in the screen shot.
Code:
instance_create_depth(mouse_x,mouse_y,0,objcursor);
global.str = 5;
global.dex=5;
global.mag=5;
global.hp=20;
global.mp=20;
global.mdef=0;
global.def=0;
global.lvl=1;
global.exp=0;
draw_text(x=120,y=318,global.str);
draw_text(x=150,y=500,"Experience: " + global.exp);
draw_text(x=20,y=500, "Lvl: " + global.lvl);
instance_create_depth(x=94,y=318,0,objbutstr);
Attachments
-
313.2 KB Views: 9