I'm relatively new to smartfox, and so far the tutorials and documentation have been a great help. But I've been building an online card game and came across a problem. I wanted to set it up so that if a user disconnects in the middle of a game, then they have a period of time (about a minute) to rejoin and things continue as normal.
I thought it would be safe to store all the necessary variables as room variables, then when the user reconnects they can just grab what's already there.But if the user who disconnected was the one who broadcast the variable, then that variable is lost and I can't get it back.
Is there any way I can make some variables persistent so that they will not be lost if someone gets disconnected?
Keeping room variables after the owner is gone.
Currently there isn't a way to handle this case.
RoomVariables are removed immediately in order to keep everyone in synch. If you need to implement a different behavior you should use server side code and imlement your logic there.
Good news is that the next major release will address this problem from the root. Stay tuned.
RoomVariables are removed immediately in order to keep everyone in synch. If you need to implement a different behavior you should use server side code and imlement your logic there.
Good news is that the next major release will address this problem from the root. Stay tuned.
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 98 guests