What exactly does this error mean? I'm stumped!
So I'm getting this error
from this graph. I thought it was because the reference coming out of the cast node was null, but I debugged it and it isn't. the only other thing I find weird is that the 'X Pos Cover Volumes' are actually coming from an interface, yet here they look like standard custom events. I don't know why this is, yesterday when I set this up it was giving me nodes with the little interface symbol at the side, but now I can't access that. I haven't changed anything!
Also why am I only getting the error from the last one? I've tried storing the character as a variable straight after the cast. no luck. I am totally stumped.
asked Dec 08 '14 at 02:22 PM in Blueprint Scripting
Asher S Einhorn
"None" is equivalent of "Null" in C++, from the look of error "Get Player Character" node return None (which means "nothing") and because you trying to call something in that character from that return it hits a error because you trying to call function in nothingness.
"Get Player Character" return only Character object which is possesed by Player Controller of specific Player, if Player Controller possess no one that node will return None, considering you spawning Character you might forgot to make it Player Controller posses it.
Problem is i don't see "Get Player Character" on your screen, are you sure it's this is where it happens? If Spawn would return None (which it can if Spawn fails) execution would not reach X Neg Volumes as it would stop on cast.
answered Dec 08 '14 at 02:40 PM
Your Bot_AA_Character is null in one of the scenarios that exists during the game lifetime, whether at startup, at the end of the game or another such case.
It is good practice to always perform "Is Valid" checks on objects that you are referencing, this will prevent any "Accessed None" errors you would otherwise encounter.
To stop this error from showing, simply add a node after your cast that checks if the Bot_AA_Character is valid.
Hope this helps :)
Follow this question
Once you sign in you will be able to subscribe for any updates here