OpenSpace and Limbo Rooms

Post here your questions about the OpenSpace 1.x or notify bugs and suggestions.

Moderators: Lapo, Bax

Biff_Cornwall
Posts: 29
Joined: 07 Aug 2009, 17:54

OpenSpace and Limbo Rooms

Postby Biff_Cornwall » 20 Nov 2009, 16:18

We have a setup where users are sent to a limbo room when they launch a game in our world. The problem is, whenever the user joins the room, openspace throws this error:

Code: Select all

TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at it.gotoandplay.smartfoxserver::SmartFoxClient/setUserVariables()
   at com.smartfoxserver.openspace::OpenSpace/setMyAvatarUserVariables()
   at com.smartfoxserver.openspace::OpenSpace/reset()
   at com.smartfoxserver.openspace::OpenSpace/onJoinRoom()
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at it.gotoandplay.smartfoxserver.handlers::SysHandler/handleJoinOk()
   at Function/http://adobe.com/AS3/2006/builtin::apply()
   at it.gotoandplay.smartfoxserver.handlers::SysHandler/handleMessage()
   at it.gotoandplay.smartfoxserver::SmartFoxClient/xmlReceived()
   at it.gotoandplay.smartfoxserver::SmartFoxClient/handleMessage()
   at it.gotoandplay.smartfoxserver::SmartFoxClient/handleSocketData()


Since the user is in a limbo room and playing a game, avatar creation and map loading/rendering don't need to occur. What's the best solution for this?

Also, there is nothing showing up in the debug log, only the error above.

Thanks in advance for any help!
Biff
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 22 Nov 2009, 17:49

Before joining the limbo room you should call the OpenSpace.clear method. When this method is called, OpenSpace removes its internal listeners to SmartFoxServer events and clears the map while showing a fade-out effect. This method can be used to stop (also temporarly) OpenSpace; then, to restart OpenSpace, simply load a new (or the same) map using the loadMap method.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v1 discussions and help”

Who is online

Users browsing this forum: No registered users and 41 guests