🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

GameMaker Studio Errors Help!

A topic by Oestrro created 360 days ago Views: 342 Replies: 2
Viewing posts 1 to 3

I'm making a game with the help of a tutorial series on youtube

the link -

https://www.youtube.com/playlist?list=PLUQ0xH2XyXg...

im stuck on the part hes making scripts for the ai they show up as blue for him but yellow for me i have no idea why when i try to play the game this is the error i get.


Thank you in advance!


___________________________________________

############################################################################################

FATAL ERROR in

action number 1

of Step Event0

for object obj_enemie:

Variable obj_enemie.aggroRange(100002, -2147483648) not set before reading it.

at gml_Script_scr_enemy_static (line 4) - if (dis <= aggroRange ) {

############################################################################################

--------------------------------------------------------------------------------------------

stack frame is

gml_Script_scr_enemy_static (line 4)

called from - gml_Object_obj_enemie_StepNormalEvent_1 (line 2) - script_execute(state);

Admin

You might want to try the gamemaker forums? I moved this topic to general development as well.

Without having watched the video myself, have you initialised the 'aggroRange' variable in the create event 'obj_enemie'?

So that would be:

aggroRange = 100

(for example)

If you did, you might have set it to be a string instead of a real number?


If it's still not working, you might wanna set 'aggroRange' as a global variable in some controller object to be sure it really exists and can be easily accessed (and changed) by all instances.


Also I agree that you will propably get the best help on this topic at yoyo's own forum.