Sign In Register

How can we help you today?

Start a new topic

issue with GS_PLAYER_DISCONNECT

Hello!

 

I have some problem, I did script on event "PlayerDisconnect"

 

 var player = Spark.getPlayer();
 var playerData = player.getScriptData("player_data");

 playerData.IsOfflineFiveMinutsAgo = false;

 player.setScriptData("player_data", playerData);


 

After that I've found error in script.log :

 

{

  "_id": {

    "$oid": "59843c4b82bd8504e22667d5"

  },

  "script": "GS_PLAYER_DISCONNECT",

  "log": {

    "stackTrace": "\tat systemModules/GS_PLAYER_DISCONNECT.js:10\n",

    "error": "TypeError: Cannot call method \"getScriptData\" of null (systemModules/GS_PLAYER_DISCONNECT.js#10)",

    "script": "GS_PLAYER_DISCONNECT"

  },

  "level": "FATAL",

  "ts": {

    "$date": {

      "$numberLong": "1501838411279"

    }

  }

}

 

Is seems like player not found.

It happens very seldom and I can't reproduce this issue.

 

What does it mean?


Thanks you!

Alexey Pozdnyakov


I got this, too.

Hi Alexey,


The error would indicate that the scriptData value for that player was null. Does every player have this set by default somewhere ? Is there any way that a player may not have this value set ?


Regards,

Liam

Hi LIam!


Sorry for a long answer I've tried to find out the reason of this issue. 

However after we've started our soft launch the error doesn't be repeated;


Thanks!

Alex.

Hi Alexey,


No problem. If you see this issue again please let us know and we'll look into it again for you.


Regards,

Liam

Login to post a comment