Announcement

Collapse
No announcement yet.

Blueprint working - Still getting "accesed none" --> Why?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Blueprint working - Still getting "accesed none" --> Why?

    Hello Forums,

    I built a blueprint to select an actor via linetrace (this is for VR), then toggle it's visibility by UMG buttons.

    It is working fine, but I get the following runtime error:

    "Blueprint Runtime Error: Accessed None trying to read property CallFunc_Array_Get_Item16 from function: 'ExecuteUbergraph_AvatarMaster' from node: Toggle Visibility in graph: EventGraph in object: AvatarMaster with description: Accessed None trying to read property CallFunc_Array_Get_Item16

    Blueprint Runtime Error: Accessed None from function: 'ExecuteUbergraph_AvatarMaster' from node: Toggle Visibility in graph: EventGraph in object: AvatarMaster with description: Accessed None"

    I can't figure out why, but I guess if I throw an "isValid?" in there it will prevent this from happening. I just don't know where to put "isValid?"...
    See my BP attached.

    Any help is much appreciated
    Last edited by Gordonis; 04-05-2018, 08:13 AM.

    #2
    What happens if none is find? It continues until 10000, but is the array that long? If not, then ERROR.
    Put in "Last Index" the length of the array. Get a wire from "Out Actors" -> Length -> "Last Index".
    Last edited by EvilCleric; 04-05-2018, 08:35 AM.
    "I have harnessed the shadows that stride from world to world to sow death and madness."

    Comment


      #3
      I'd start by making that a ranged based loop. Drag from the output on GetAllActorsofClass and do a ForEachLoopWithBreak.

      Click image for larger version  Name:	Loop.png Views:	1 Size:	99.7 KB ID:	1455796

      It shouldn't throw you any errors this way unless the get all actors returns an empty array.
      http://www.bradonhernandez.com

      Comment


        #4
        Originally posted by Demeese View Post
        I'd start by making that a ranged based loop. Drag from the output on GetAllActorsofClass and do a ForEachLoopWithBreak.

        Click image for larger version Name:	Loop.png Views:	1 Size:	99.7 KB ID:	1455796

        It shouldn't throw you any errors this way unless the get all actors returns an empty array.
        Wow, it's that simple. Thank you very much, this works.

        Originally posted by EvilCleric View Post
        What happens if none is find? It continues until 10000, but is the array that long? If not, then ERROR.
        Put in "Last Index" the length of the array. Get a wire from "Out Actors" -> Length -> "Last Index".
        Thanks for your help as well, EvilCleric, but I will go with Demeese's solution.

        Comment

        Working...
        X