I keep getting this Blueprint error, anyway to fix it?
Are you spawning this class somewhere and trying to access and set the stamina variable? Because if the Spawn process fails, the return value will be NULL and you will get the accessed none error.
Make sure the return value “IsValid” before using it.
Yeah it’s from a character select screen, I click the character “Mai” and she spawns at a specified world location and I possess her.
What do I plug into the blue circle of “isValid” and do I put isValid at even begin play?
No put IsValid behind the Spawn Node. Plug the return value in it. This will make sure that the Return Value is not NULL.
Would you mind showing me the part of the Blueprint where you are doing this? (: Remember, it is the part where you try to set the stamina variable after spawning the char.
Here it is, in the widget I spawn and possess. Then in her event begin play I set stamina.
I have 2 other characters doing this but they are working fine.
Try putting the “IsValid” directly behind SpawnActor. Plug the “Is Valid” output in the delay (going on the same way as you did before) and the “Is Not Valid” into the SpawnActor again,
I tried that just now and the error persisted, can you explain to me what’s going wrong again.
So when I spawn and possess, for X reason Stamina variable is being set without there even being the actor to which it belongs?
anyone know the solution to this?
Hey MezioPleo,
I think this might be one of those instances where the log is not pointing you in the right direction. Often a reference to your character can be an issue, so focus on places that you reference your character. Can you go through and put an IsValid check before any reference to your character, Player Controller, etc (plugging that reference into the input pin of IsValid)
If that doesn’t work, and I know this is frustrating, but can you go about disconnecting bits and pieces of your blueprint until the error goes away, then send me a screenshot of what you had just disconnected.
Thanks,
.
Thanks for the reply, so I removed that entire function and all its references from my characters blueprint. Then I started getting errors in the Construction Script.
Does that mean that somewhere in my map I have that character spawned?
Errors in the construction script doesn’t mean you have a character spawned. Did you go through my suggestion of adding IsValid checks?
Removing an entire function from a blueprint is bound to cause errors, but I don’t have a frame of reference for tracking the issue with the information that is provided.
-.
Hey ,
I went through checking in my reference viewer, I have a widget that lets you see a description and select your character when you click on them.
Then you can click on a select button and it’s spawn and you possess the character.
This is the spawn button’s blueprint and I put a IsValid to check if the spawned actor exists before possessing and it returns true.
I’ll ask the team and get in touch with you, the thing is this projects almost 8 gigs now so transferring the whole thing may take to upload.
Hey MezioPleo,
How would you feel about sending in a copy of your blueprints or your project? If you want to send one or the other, you can [PM me on the forums with a download link.
-.
https://
Hi ,
I have had errors where you click on the error, it gives you the node that fails (a lot says construction script), not where the initial damage is caused.
Track backwards, to backwards from where these references start, all of them and run through it again. I have done this a few times, and found 1 node with the wrong pin in the wrong place. Easy to do. That is why the best bring out games with bugs.
Solved!
It had nothing to do with the Stamina variable at all.
it was some random chain of nodes when releasing the right mouse button. I deleted them and replaced the code with something smaller and it works.
Thanks all for the help
Hey ,
That’s great!! For curiosity’s sake, would you mind posting a screenshot of the offending node network and the fixed version?
-.