Announcement

Collapse
No announcement yet.

Why would this give me a warning..?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    @TheJamsh, I have a question, is your error only happen once in a while when game starts, or once in a while when new player spawns(when PostLogin event is called)?

    I recently run into some bug with UE4, I can't reproduce it yet as it's pretty random but it's like this.
    1. you create a new variable in a blueprint
    2. you edit anything in the detail panel, somehow the editor will select another variable

    I don't know what triggers this behavior, but once it happens, it sticks until you close editor and open again.
    And there are some slight chance that editor will crash when encounter this.

    So, one test you can try is, if you close and open editor, does this error ever occur on the first time you PIE?(Just open and PIE, do nothing else.)
    If you try say 10~20 times(depends on the frequency you get that error) and gets no error in first PIE, then maybe it's some editor bug.
    (on a side note, I bet many people already aware of this, that dynamically generated blue named object when PIE, they will accumulate in naming.
    ie. for game mode, MyGame_C1, and then MyGame_C2, and continue to add numbers.)

    Leave a comment:


  • replied
    Originally posted by pattym View Post
    The problem is that your using "GetActorOfClass" in the construction script. Actor aren't really registered until you play the game and only know about themselves, this results in the array being empty. Having said this though index 0 will be populated with "None" causing it to progress through the "ForEachLoop" once as it thinks there's an item. Move it all into your main graph and have it come off the "Begin Play", that should get rid of the error for you.
    Yea I did try that already, but it didn't make any difference. The issue is sporadic, I even added some code that would filter through the Array and remove any 'None' entries before it got to the spawning part of the script, still had no luck :/

    Leave a comment:


  • replied
    Hmmmm. The only other place I can think that the "None" value is coming from is if you've added an index to the array in the "Defaults" tab. As you don't clear the array before you add anything too it, the "None" value would stick around. It would explain why it wouldn't pop up as much the more player starts you add.

    Leave a comment:


  • replied
    @pattym, that's true if it was custom blueprint objects, however, it's native playerstart class, what you said wouldn't be a problem for OP.

    Leave a comment:


  • replied
    The problem is that your using "GetActorOfClass" in the construction script. Actor aren't really registered until you play the game and only know about themselves, this results in the array being empty. Having said this though index 0 will be populated with "None" causing it to progress through the "ForEachLoop" once as it thinks there's an item. Move it all into your main graph and have it come off the "Begin Play", that should get rid of the error for you.

    Leave a comment:


  • replied
    Originally posted by TheJamsh View Post
    I tried that but still got the same error. I've rebuilt the nodes completely but now it points me to the 'Branch' nodes with errors instead. Something is definitely not right here...
    If you can't be sure about what went wrong, check with isValid before you try to access or assign it to another variable.
    Anything you get from an array index should be 0~length-1, including the random part to pick player start.

    Leave a comment:


  • replied
    I happen to my months ago, when errors in nodes or empty places I am struggle to remember how i resolve, it was very silly.
    Last edited by DomusLudus; 09-06-2014, 05:15 AM.

    Leave a comment:


  • replied
    Originally posted by PenguinTD View Post
    when you loop an array, it should be index 0 to length-1, because unreal use 0 as first element array.
    I tried that but still got the same error. I've rebuilt the nodes completely but now it points me to the 'Branch' nodes with errors instead. Something is definitely not right here...

    Leave a comment:


  • replied
    when you loop an array, it should be index 0 to length-1, because unreal use 0 as first element array.

    Leave a comment:


  • replied
    Well, I copy-pasted the sequence that gets all the player-starts in the level and used a begin play node instead. Now it's just throwing me at the construction script node. WHY. There's nothing in my construction script argh.

    EDIT: I've tried everything now, I even did a check to remove anything that isn't a playerstart from those arrays in the construction script as well. Still getting the occasional error. Makes no sense?!
    Last edited by TheJamsh; 09-05-2014, 08:28 AM.

    Leave a comment:


  • replied
    Probably start to check the "game start" before all object are loaded in the map. You can do it a cast to check that the class exist.

    Leave a comment:


  • started a topic Why would this give me a warning..?

    Why would this give me a warning..?

    Experiencing a random glitch with my method of spawning actors based on Player Starts. Basically I've given each playerstart in the level a tag, and if it has the appropriate tag, it adds it to an array of possible spawnpoints. All of this functionality happens in the game mode, but when I begin play, I get this error, sometimes multiple times:

    Click image for larger version

Name:	error.JPG
Views:	1
Size:	19.3 KB
ID:	1138140

    What's odd is that it still kind of works... These are the scripts for the GameMode:

    Click image for larger version

Name:	Construct.JPG
Views:	1
Size:	85.3 KB
ID:	1138141
    Click image for larger version

Name:	Derp.JPG
Views:	1
Size:	106.3 KB
ID:	1138142

    Adding more Player Starts to the level with the right tags reduces the amount of times I get the issue, but it still crops up occasionally.
Working...
X