Accessed None error I can't explain
I am receiving an error which I can't explain, cause everything works as intended but yet I still get the error. I've got no clue what it is.
PS: All that love and kissing variables is cause iam making an Romeo & Juliet based game. :)
asked Jan 15 '16 at 12:55 AM in Blueprint Scripting
"Accessed None" means something trying to access non set object varable (blue pin) in your case it Set nodes which means that HUD varable is not set. It might None at some point, but on 2nd call it might be set. thats why everything might work correctly, blueprints are very tolerant to runtime errors. You need to analyze when ball sets are called, by guess is it happens on start of the game where actors are placed to the world and may collide before HUD is set. Simplest brute force fix would be check if HUD is not None first calling SET nodes, which you can do with "Is Valid" node
Ensure your HUD is initialized before you need to call it. Best place for initialization is typically the Event Begin Play as nothing else (except the construction script) is called before the Begin Play meaning anything you initialize is done prior to calls to them.
If you are still having issues, run a simple 'IsValid' function on it like so:
And just in case you're unsure what I mean by initialize your HUD, it should look something like this, in the same blueprint you have the Overlaps:
Hope this helps!
answered Jan 15 '16 at 06:39 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here