Post here your questions about Actionscript and Java server side extensions development.
Moderators: Lapo , Bax
d3m0nlogic
Posts: 32 Joined: 19 Aug 2010, 22:44
Location: Santa Monica
Post
by d3m0nlogic » 11 Sep 2010, 08:33
I 've been trying to get this to work... and no success at all...
int _pl = _room.switchSpectator(_userRef);
when I do this... the spectator doesn't get switch to a player.. and vice-versa when I use the other method>
Boolean inval = _room.switchPlayer(_userRef);
.... I think the server is laughing at me right now.
Abyssus abyssum invocat,Ad hominem Ad Libitur..Non Conserva me ab animam inferno...liberate tutame ex inferis
BigFIsh
Posts: 1698 Joined: 25 Feb 2008, 19:26
Location: New Zealand
Post
by BigFIsh » 11 Sep 2010, 20:34
See
here for the proper uses of those methods
Smartfox's forum is my daily newspaper.
d3m0nlogic
Posts: 32 Joined: 19 Aug 2010, 22:44
Location: Santa Monica
Post
by d3m0nlogic » 12 Sep 2010, 04:59
AAAAhhhh! Ok. so ....not _room.method -->_helper.method
Got it. I will try it and get back to you. Thank you sir...
Abyssus abyssum invocat,Ad hominem Ad Libitur..Non Conserva me ab animam inferno...liberate tutame ex inferis
d3m0nlogic
Posts: 32 Joined: 19 Aug 2010, 22:44
Location: Santa Monica
Post
by d3m0nlogic » 13 Sep 2010, 19:36
and the server is still laughing
.. (doesn't work.)
I see no change in the amount of spectators in the room. And another curious thing is the player id for all players is 0. ?????!!?!?!
ugh....
Abyssus abyssum invocat,Ad hominem Ad Libitur..Non Conserva me ab animam inferno...liberate tutame ex inferis
BigFIsh
Posts: 1698 Joined: 25 Feb 2008, 19:26
Location: New Zealand
Post
by BigFIsh » 13 Sep 2010, 21:54
Is the room that you are executing the 'switchPlayer/switchSpectator' to a game room?
Smartfox's forum is my daily newspaper.
d3m0nlogic
Posts: 32 Joined: 19 Aug 2010, 22:44
Location: Santa Monica
Post
by d3m0nlogic » 13 Sep 2010, 22:51
Yes sir they are. isGame="true" on all of the room in the config.xml
Abyssus abyssum invocat,Ad hominem Ad Libitur..Non Conserva me ab animam inferno...liberate tutame ex inferis
BigFIsh
Posts: 1698 Joined: 25 Feb 2008, 19:26
Location: New Zealand
Post
by BigFIsh » 13 Sep 2010, 23:10
Weird - and the player indexes are all zero? It should automatically change when players enter/leaves a game room. May I ask what server version you have? Also, where (and when) about are you executing the spectatorSwitch method?
Smartfox's forum is my daily newspaper.
d3m0nlogic
Posts: 32 Joined: 19 Aug 2010, 22:44
Location: Santa Monica
Post
by d3m0nlogic » 13 Sep 2010, 23:18
1.6.6 with 6.9 patch. and I do the [switch]method after the user has join the room and wants to a play a game , it then switches(or supposed to switch) spectator to player the when the user leaves the room or sends a bad card the game will kick the user to the Lobby... which I have changed to game as well.
Abyssus abyssum invocat,Ad hominem Ad Libitur..Non Conserva me ab animam inferno...liberate tutame ex inferis
BigFIsh
Posts: 1698 Joined: 25 Feb 2008, 19:26
Location: New Zealand
Post
by BigFIsh » 14 Sep 2010, 00:28
Hm.. I'm not 100% why you're getting no player indices. Could you check your AdminTool to confirm this?
Smartfox's forum is my daily newspaper.
d3m0nlogic
Posts: 32 Joined: 19 Aug 2010, 22:44
Location: Santa Monica
Post
by d3m0nlogic » 14 Sep 2010, 16:54
Abyssus abyssum invocat,Ad hominem Ad Libitur..Non Conserva me ab animam inferno...liberate tutame ex inferis
Lapo
Site Admin
Posts: 23438 Joined: 21 Mar 2005, 09:50
Location: Italy
Post
by Lapo » 15 Sep 2010, 08:03
Just to make sure that this is not a bug with the admin tool you should perform a couple of extra checks.
Invoke the switchPlayer, then check the User playerId directly, by calling user.getPlayerIndex().
Also the client should receive the event and you should be able to double check the playerId on the client side too.