x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Accesed none error

So I was following this tutorial for setting up character movement and I encountered the error below. I checked ten times and I am sure I did everything the same as him. Can somebody help me? If you need more screenshots just ask. Here is the link of the video: Unreal Engine 4 - Sprinting and Stamina Bar (Part 1)

alt text

Product Version: UE 4.21
Tags:
accesednone.png (310.4 kB)
more ▼

asked Mar 03 '19 at 03:31 PM in Blueprint Scripting

avatar image

meme2sin
3 3 1 4

avatar image Everynone Mar 03 '19 at 03:42 PM

Can you show the screenshot of where you add the widget to the viewport - click the underlined Add to Viewport.

avatar image meme2sin Mar 03 '19 at 07:47 PM

Here you go.alt textalt text

addtoviewport.png (513.6 kB)
widget.png (387.4 kB)
avatar image Everynone Mar 03 '19 at 07:53 PM

Weird, can you try right clicking that create widget node and refresh, then compile. Is the widget compiled successfully?

Also hooking up Get Player Controller to Owning Player might help.

avatar image meme2sin Mar 03 '19 at 08:27 PM

I refreshed and added the player controller but nothing changed. Something which I forgot to mention before was that the widget does appear on screen but it just doesn't work. Out of curiosity, is the blueprint from the tutorial supposed to work or is it outdated?

avatar image Everynone Mar 03 '19 at 08:55 PM

Something which I forgot to mention before was that the widget does appear on screen but it just doesn't work

You're experiencing something strange. Can you show the widget you're creating? Is the widget blueprint compiled with no errors?

Nah scratch that, you've already attached it. I would restart the editor at this point.

I can't think of anything that could generate this error based on what you've got here. Especially that the widget is added to the screen just fine...

One thing you could try doing (if restarting does not solve it), right click the return value (create widget node) and promote to variable.

avatar image meme2sin Mar 09 '19 at 02:37 PM

Welp, things just got weirder. I looked at the tutorial and decided to get rid of the one thing which I did different, the border and now it works with the only problem being that I am STILL getting the error message. Unreal engine is hard...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

I went ahead and made a new project and migrated all the assets and it started working. I have no idea why this happened but I that's how you solve it

more ▼

answered Apr 07 '19 at 06:22 PM

avatar image

meme2sin
3 3 1 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Whenever you receive that error, try adding the "Isvalid" macro to prevent it from continuing an execution sequence with a blank value. It removes the error, but will not necessarily solve the problem.

The error occurs because you are trying to perform some sort of function that relies on a variable, but the variable isn't set when you run your function so it returns that error to let you know you haven't set a value to the variable. You can also solve this by considering the sequence of events.

For example, if you attempt to do something with a widget, but you haven't yet added that widget to the viewport or set the widget reference before you start your function, it will return with trying to read none. If you change the sequence so that you set the widget reference before running the functionality, it will work.

more ▼

answered Mar 03 '19 at 04:00 PM

avatar image

Crowley Caine
643 8 9 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

In my experience of adding a widget to the viewport, I had to add a small delay node before actually calling the add to viewport node. I think this is because it tries to add the widget to the viewport the exact tick the character comes into play, but at that time the character isnt fully initialized and isn't ready to be refereneced by other lines of code.

TL:DR: Add a .5 second delay before calling the add to viewport node.

more ▼

answered Mar 09 '19 at 02:58 PM

avatar image

Lolxh4
81 1 5 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question