Hello,
I think there might be a bug when a user updates his user variables in the following scenario:
- Players 1 and 2 join the same room
- Player 1 sets a user variable indicating that he wants to create an SFSGame
- Server catches the variable update and creates an SFSGame with Player 1 as the owner
- Player 2 sets a user variable indicating that he wants to join the SFSGame above
- Server catches the variable update and joins Player 2 in the SFSGame above
- Player 2 sets a user variable indicating that he wants to leave the SFSGame
- Server catches the variable update and makes Player 2 leave the SFSGame
- BUG: Now whenever player 2 sets user variables, Player 1 does not receive the USER_VARIABLES_UPDATE event
It seems that when Player 2 left the SFSGame room then whenever he sets user variables the others can't see them.
Is this something that we might be doing wrong here?
Thank you,
Vaios
Bug in updating user variables and SFSGames
Re: Bug in updating user variables and SFSGames
Why are you using UserVariables to send custom requests to the server?
You can directly invoke Extensions from the client side by using custom commands and any number of parameters.
Example:
UserVariables are broadcast to all other users causing a much larger update and waste of bandwidth.
You can directly invoke Extensions from the client side by using custom commands and any number of parameters.
Example:
Code: Select all
var params:SFSObject = ...
...
sfs.send(new ExtensionRequest("EnterGame", params));
UserVariables are broadcast to all other users causing a much larger update and waste of bandwidth.
Re: Bug in updating user variables and SFSGames
I am not using user variables for every message. The steps I sent you are for a very specific scenario.
Re: Bug in updating user variables and SFSGames
Yes but it doesn't make sense to use UserVariables to invoke requests on the server side. UserVariables are for setting custom properties to a User and dispatch them to all clients.
You are not storing values, you are request actions, therefore you should use Extension calls.
If you need a quick tutorial on how this works check this video: http://www.youtube.com/watch?v=nKGxhwJ0 ... -X3Zw&lr=1
You are not storing values, you are request actions, therefore you should use Extension calls.
If you need a quick tutorial on how this works check this video: http://www.youtube.com/watch?v=nKGxhwJ0 ... -X3Zw&lr=1
Re: Bug in updating user variables and SFSGames
I appreciate your tips, however right now you are not helping me you are trying to make a different point. As I said, I am not using user variables instead of extension requests, in fact ignore the steps I sent you.
Here are some new steps:
- Players 1 and 2 join the same room
- Player 1 sends a request to the server to create an SFSGame
- Server creates an SFSGame with Player 1 as the owner
- Player 2 requests to join the SFSGame above
- Server joins Player 2 in the SFSGame above
- Player 2 requests to leave the SFSGame
- Server makes Player 2 leave the SFSGame
- BUG: Now whenever player 2 sets user variables, Player 1 does not receive the USER_VARIABLES_UPDATE event
Here are some new steps:
- Players 1 and 2 join the same room
- Player 1 sends a request to the server to create an SFSGame
- Server creates an SFSGame with Player 1 as the owner
- Player 2 requests to join the SFSGame above
- Server joins Player 2 in the SFSGame above
- Player 2 requests to leave the SFSGame
- Server makes Player 2 leave the SFSGame
- BUG: Now whenever player 2 sets user variables, Player 1 does not receive the USER_VARIABLES_UPDATE event
Re: Bug in updating user variables and SFSGames
It's no bug.
Two users are able to share their variables only when they are in the same Room(s)
That's why I am saying that you are using the wrong tool for your job, mate
Thanks
Two users are able to share their variables only when they are in the same Room(s)
That's why I am saying that you are using the wrong tool for your job, mate
Thanks
Re: Bug in updating user variables and SFSGames
So if user 1 is in 2 rooms and user 2 is in one of these rooms but not all of them then they won't be able to share user variables?
If so then this is problematic in our case, because all users are joined in one main room but they can simultaneously be joined in other rooms ( like minigame rooms, or chat rooms etc. ). When players walk around and interact with stuff they exchange messages AND user variables in some cases where properties need to be synced with other users in the main room. Again we are NOT using user variables to invoke server actions but we do need to sync user properties now and then.
Are you telling me that if a user is joined in this main room but also joined in a minigame then he won't be able to sync user properties with other players in the main room?
If so then this is problematic in our case, because all users are joined in one main room but they can simultaneously be joined in other rooms ( like minigame rooms, or chat rooms etc. ). When players walk around and interact with stuff they exchange messages AND user variables in some cases where properties need to be synced with other users in the main room. Again we are NOT using user variables to invoke server actions but we do need to sync user properties now and then.
Are you telling me that if a user is joined in this main room but also joined in a minigame then he won't be able to sync user properties with other players in the main room?
Re: Bug in updating user variables and SFSGames
Two users must be in at least one room together to receive their relative UserVars updates.
Re: Bug in updating user variables and SFSGames
Ok so this looks like a bug then... Because at the end of my example Player 1 is joined in this main room AND the SFSGame room and Player 2 is only joined in the main room. They share one room in common ( the main room ) however Player 1 does not see user variable updates from Player 2
Re: Bug in updating user variables and SFSGames
I am testing the same scenario with the latest SFS2X 2.5 and the Flash API 1.1.5 and no problem was found.
You didn't mention the version of the server in use nor the API type and version.
I would recommend the following:
1) Check that the users really are sharing one Room and that this Room has the USES_VARIABLES permission active
2) Make sure you are not using a super old version of the server and API
3) If so, please update, recompile the client and retry
Thanks
You didn't mention the version of the server in use nor the API type and version.
I would recommend the following:
1) Check that the users really are sharing one Room and that this Room has the USES_VARIABLES permission active
2) Make sure you are not using a super old version of the server and API
3) If so, please update, recompile the client and retry
Thanks
Re: Bug in updating user variables and SFSGames
I am using the 2.5.0 version of the server and the 1.0.6 version of the c# client. I will take a look at the issue again tomorrow and report back however the users are in the same room and that room has the USES_VARIABLES permission.
Re: Bug in updating user variables and SFSGames
I should mention that the server code that makes Player 2 leave the SFSGame is inside a SysControllerFilter which might affect it?
Re: Bug in updating user variables and SFSGames
Sorry for the delay but this is related to a big system and it took a few days for us to debug and fix. From what I understand this was our fault as various exceptions were being thrown but due to a problem in our logger we didn't see the errors.
After fixing the logger we fixed all the errors and things went back to normal. Sorry for all the trouble!
After fixing the logger we fixed all the errors and things went back to normal. Sorry for all the trouble!
Re: Bug in updating user variables and SFSGames
Good, I am glad you were able to figure what was wrong.
Who is online
Users browsing this forum: No registered users and 99 guests