_server.joinRoom hates me! :(

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

User avatar
Virusescu
Posts: 260
Joined: 07 Sep 2005, 09:36
Location: [RO]Bucharest
Contact:

Postby Virusescu » 02 Mar 2006, 21:09

hey sparticus... what's up with that extra ".instance" thing?

Code: Select all

var u = _server.instance.getUserByChannel(chan)
var ok = _server.joinRoom(u,-1,false,2)


I think it should be:

Code: Select all

var u = _server.getUserByChannel(chan)
var ok = _server.joinRoom(u,-1,false,2)
Sparticus
Posts: 227
Joined: 27 Feb 2006, 17:44
Location: Canada
Contact:

Postby Sparticus » 02 Mar 2006, 21:16

Thanx for responding. I put that there because the documentation I read had it there too. I removed it and it gives the exact same error :

14:22:05.125 - [ WARNING ] > InternalError: Can't find method it.gotoandplay.sma
rtfoxserver.extensions.ExtensionHelper.joinRoom(it.gotoandplay.smartfoxserver.da
ta.User,number,number,boolean,undefined,undefined,undefined). (dbExtension.as#34
6)
Sparticus
Posts: 227
Joined: 27 Feb 2006, 17:44
Location: Canada
Contact:

Postby Sparticus » 02 Mar 2006, 21:23

omg... I just got it working!!!!!!

everywhere in the documentation I see the following :

var ok = _server.joinRoom(userObj, currId, true, newId)

but that never worked for me ..... I tried everything.... Well, I got desperate and did the following and it worked!

var ok = _server.joinRoom(u,-1,false,1,"",false,false)

I added in the blank password, and false for the other two fields and it worked.

Is there an error in the documentation or did I just find a work around?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 03 Mar 2006, 17:23

Is there an error in the documentation or did I just find a work around?


By passing all the necessary arguments you've done the most correct thing.
The error is not really in the doc it is more in the framework.
Sorry for the incovenience :?
The 1.4.0beta... is still in beta :P So you may find a few inconsistenices in the docs or in the new methods of the framework.

The final 1.4.0 release is coming soon
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 21 guests