Jump to content

PSA: For Anyone Stuck with Tons of "Accessed None 'PlayerState'" Log Messages


btysgtmajor

Recommended Posts

If you're reading this, you've likely found out that sometimes UIScreenListener extensions can cause games when loaded (after an original load) to get stuck on a loading screen and watch your log get spammed with messages like:

 

ScriptWarning: Accessed None 'PlayerState'
X2TacticalGameRuleset Plot_WLD_Highway_MdObj_01.TheWorld:PersistentLevel.X2TacticalGameRuleset_0
Function XComGame.X2TacticalGameRuleset:UnitActionPlayerIsAI:0080

No fun.

 

Anyway, I've read in some places that UIScreenListener extensions can be a bit picky, and the tutorials don't really say all that much. And while I wasn't able to figure out precisely how I fixed it, I know it was one of the following so be sure to check through this list with your UIScreenListener extension:

 

  1. In your "defaultproperties", make sure the value of "ScreenClass" is set to strictly the class name with no quotes or class'X' decorations.
  2. When you call out to "Screen.Movie.Pres.Spawn(...)", don't store the return value (this seems unlikely to be the culprit, but, I didn't want to go back and eliminate things one by one, mainly because I was tired and I have to work in the morning).
  3. Guard the "Screen.Movie.Pres.Spawn(...)" with something like: "if (Screen.GetChildByName('UIMyNewPanel', false) == none)". In other words, don't give the extension the chance to create the same controls/panels multiple times.

 

I hope this helps someone else.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...