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"

Accessed Non trying to read property on a widget variable even after creating it

Hi, I'm new using Blueprint and I keep getting this runtime error with my script:

alt text

alt text

There is my blueprint script, called from the BeginPlay of my Level Blueprint. It is located on the Game Instance Class of my project.

Thank you

Product Version: UE 4.21
Tags:
screenshot1.png (106.5 kB)
screenshot2.png (36.4 kB)
more ▼

asked Jan 20 '19 at 07:52 PM in Blueprint Scripting

avatar image

Tormelinean
1 1 2

avatar image Nebula Games Inc Jan 20 '19 at 10:42 PM

Looks like you aren't using the correct player controller. This is probably an issue with the world settings for the level. And due to the incorrect controller you aren't creating the widget properly so the variable is not valid when you try and add the menu widget to the viewport. Fix the controller issue and the other one will likely resolve.

avatar image Tormelinean Jan 22 '19 at 10:40 AM

Thanks for your reply. The issue seems to be this one. It works if I uncheck the "Run dedicated server" but with this option I'm getting the error. How can I fix this or know the index of the current player to select?

avatar image Jawdy Jan 22 '19 at 11:42 AM

Dedicated servers are "headless" meaning that they have nothing to render to. Do a check if Dedicated or not, and only call this code if NOT a Dedicated server.

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

0 answers: sort voted first
Be the first one to answer this question
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