Announcement

Collapse
No announcement yet.

"Accessed None trying to read property: ...

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

    "Accessed None trying to read property: ...

    Hello,

    I've seen this problem floating around and kind of understand what it means, and some people have found with putting down an "isValid" blueprint to fix this. My problem is if that's what I need I don't know where it would go. I am getting two of these errors coming from my GameInstance class:


    Thanks in advance
    Attached Files

    #2
    Looks like the error is on your Player Controller. Check IsValid for that.

    I don't 100% understand the reason for this but I think it's because GI is persistent while PC is spawned per level. Usually you always expect there to be a player controller in slot 0 but there could be situations where this is not the case.
    Procedural, modular, on-the-fly animation - iTween For UE4
    - Actors - Components - UMG - Ease In - Ease Out - Path-constrained Animation - $0

    Runtime Datatable
    -All the fun of DataTables dynamically loaded from text or Google Sheets while your game is running!

    Comment


      #3
      Okay, that makes sense. Where would I put it and how would I hook it up though? Because isValid returns a boolean, so where would I hook that up to? Would I go from the "Get Player Controller" node or the "Create BPW Menu Main Widget"?

      Thanks

      Comment


        #4
        Who is calling AddWidget? When you are calling AddWidget, the player still doesn't exist, and therefore the error. Adding a IsValid node would solve this problem, but since this function is only called once, it won't add the widget at the end. So I recomend, calling it, after the player is created, so why not making the player calling it.
        Last edited by EvilCleric; 06-18-2020, 02:25 AM.
        "I have harnessed the shadows that stride from world to world to sow death and madness."

        Comment

        Working...
        X