Sign In Register

How can we help you today?

Start a new topic

Exception in real time script causes an infinite loop

Exception in RTSession.onPacket(packetCode, function(packet) {..<exception>..})

I have corrected the error in the code. But the old script is working


Hi Vsevolod,


You have corrected the error in code but the old code is still running is that correct? Have you setup more then one Real Time script?


Kind regards,

 - Steve

I started new match. In the new match there is not exception, because the code is corrected. 

var matchId = Spark.getMultiplayer().createMatchById(playerId1, playerId2);
var match = Spark.getMultiplayer().loadMatch(matchId);
match.enableRealtime("MMOLocation");

  How to finish the old match? In the old match has no players, but it endlessly writes logs.


Hi Vsevolod,


In the portal in the NoSQL tab you should be able to find the matchInstance Collection. You should remove all documents in this collection to stop any current matches that haven't ended automatically, it might also be a good idea to clear out the pendingMatches collection as well just to make sure.


Hope this helps,

 - Steve

For example, this functions automatic stoped, if all players are disconnected:

RTSession.setInterval(function(){    ...    }, 500);

This function is infinite working :

 

RTSession.onPacket(packetCode, function(packet) {..<exception>..})

 

Hi Vsevolod,


Have you tried what I suggested? Has it removed the endless match creating logs?


 - Steve



Collections are empty. It does not help. You have the same bug and Unity3d, and realtime API. If the packet processing error occurs, the processing of the event is called again


having the same issue. Any fix?


Hi Ihor,


Please get the details of this issue into a ticket and we'll look into this for you.


Regards,

Liam

Login to post a comment