unloadMap() problem

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

Moderators: Lapo, Bax

pushpender
Posts: 10
Joined: 25 Jul 2011, 07:56

unloadMap() problem

Postby pushpender » 13 Sep 2011, 07:25

hi

i m trying to unload a map(when i switch into a game room) using openspace.unloadMap().

i m getting this error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.smartfoxserver.openspace.engine.control::IsoEngineController/http://www.smartfoxserver.com/openspace/osInternal::setGhostPosition()
at com.smartfoxserver.openspace.engine.control.avatar::AvatarAnimator/adjustAvatarRendering()
at com.smartfoxserver.openspace.engine.control.avatar::AvatarAnimator/onAvatarAnimationStep()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at com.greensock::TweenMax/renderTime()
at com.greensock.core::SimpleTimeline/renderTime()
at com.greensock::TweenLite$/updateAll()

please help.
thank you
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 14 Sep 2011, 11:27

We are not able to reproduce this issue. Can you provide more details on the actions you make before the error is thrown?
Also, are you using the latest 2.0.4 version?
Paolo Bax
The SmartFoxServer Team
pushpender
Posts: 10
Joined: 25 Jul 2011, 07:56

Postby pushpender » 14 Sep 2011, 12:12

hi

i have game icons in a map(a default room). so once the user click on the game icon he will enter into the room(which is a game room). when user switch into game room i want to unload the previous map.

so before loading new map i use smartfox.unload().
i m using openspace 2.0.1.

i m not saying this is a bug in open space may be i m doing something wrong.

Also smartfox.sendObjectToGroup method is not working for me(sendObject is working fine).

thanks for reply
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 15 Sep 2011, 06:30

First of all you should upgrade to OpenSpace 2.0.4.
Are you sure the unloadMap is needed? When you join the game room OpenSpace should leave the map automatically (unless you use the multi-join feature). I believe that is why when you call the unloadMap method, that null pointer exception is thrown.
Paolo Bax
The SmartFoxServer Team
pushpender
Posts: 10
Joined: 25 Jul 2011, 07:56

Postby pushpender » 15 Sep 2011, 07:48

ok i will upgrade open space asap.
if open space unload the map automatically then i don't have to unload it.

thanx for your help bax.
pushpender
Posts: 10
Joined: 25 Jul 2011, 07:56

Postby pushpender » 15 Sep 2011, 08:04

ok i will upgrade open space asap.
if open space unload the map automatically then i don't have to unload it.

thanx for your help bax.

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 61 guests