1. Hey! Guest! The 32nd GMC Jam will take place between Feb 22nd, 12:00 UTC (Friday noon) and Feb 25th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

help

Discussion in 'Programming' started by kwee, Feb 10, 2019.

  1. kwee

    kwee Member

    Joined:
    Feb 8, 2019
    Posts:
    3
    ############################################################################################ FATAL ERROR in action number 1 of Step Event0 for object obj_namecheck: Unable to find any instance for object index '7' name 'obj_stat' at gml_Object_obj_namecheck_Step_0 (line 47) - obj_stat.name = name; ############################################################################################ -------------------------------------------------------------------------------------------- stack frame is gml_Object_obj_namecheck_Step_0 (line 47)
     
  2. curato

    curato Member

    Joined:
    Jun 30, 2016
    Posts:
    101
    Hard to say without seeing the code but off the top of my head I would say that the object you are referring to doesn't exists. I would check instance_exists first if the existence of the object may not happen all the time or check the instance creation order make sure it exists before you go looking for it.
     
  3. Amon

    Amon Member

    Joined:
    Sep 13, 2016
    Posts:
    169
    Have a think about why no one has posted to help you yet by looking at how other people post for help. When you realize it you'll know what to edit.
     
    BaBiA Game Studio, rIKmAN and Binsk like this.
  4. Binsk

    Binsk Member

    Joined:
    Jun 22, 2016
    Posts:
    482
    Never use an object name to reference its variables unless you have exactly 1 instance of that object in the room. Less than 1 gives you the error above while more than 1 will only change the variable for the one that was added to the room first.

    That is your issue. Instead you should grab the instance ID and change the variable through that. This also would have revealed that you had 0 instances of that object in the room.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice