Page 1 of 1

unloadMap() problem

Posted: 13 Sep 2011, 07:25
by pushpender
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

Posted: 14 Sep 2011, 11:27
by Bax
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?

Posted: 14 Sep 2011, 12:12
by pushpender
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

Posted: 15 Sep 2011, 06:30
by Bax
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.

Posted: 15 Sep 2011, 07:48
by pushpender
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.

Posted: 15 Sep 2011, 08:04
by pushpender
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.