Hi,
I'm attempting to do as above, my workflow is as below (based on CustomOSExtension example):
1. Check if user has map data already (stored in database)
2. If not, load map data from .map template created in editor
3. Load inventory and library data from .inv and .lib templates
4. Save map, inventory and library data to database
5. Create room and set _os_mapId room variable
6. sendAvatarToMap
The issue I am having occurs at point 6. I have overridden the relevant methods of the OS Java extension, i.e. loadMapData, saveMapData, isMapUpToDate, loadInventoryData, isInventoryUpToDate, loadLibraryData, isLibraryUpToDate.
A java exception is being thrown -- LoadMapException -- as a library id cannot be retrieved for my map.
Is there some additional room variable I need to set to have OS recognise a library (and inventory) id?
I've read through documentation and searched forum posts but cannot find any reference as yet.
Any help would be appreciated.
Thanks
Storing map, inventory and library in database
- zoomandenhance
- Posts: 13
- Joined: 11 May 2010, 01:59
- zoomandenhance
- Posts: 13
- Joined: 11 May 2010, 01:59
Sure, here it is here -- note, I have taken the trace from one line before the exception was thrown up until the point I stopped the server:
Code: Select all
17:46:11.865 - [ INFO ] > [OpenSpace] Room 'park_100000219290349' [2] joined; no
w loading associated map '100000219290349
CustomOSExtension: the following exception occurred:
com.smartfoxserver.openspace.exceptions.LoadMapException: Unable to retrieve lib
rary id for map '100000219290349'
at com.smartfoxserver.openspace.commands.LoadMapCommand.loadMap(LoadMapC
ommand.java:140)
at com.smartfoxserver.openspace.commands.LoadMapCommand.execute(LoadMapC
ommand.java:104)
at com.smartfoxserver.openspace.OpenSpaceExtension.sendAvatarToMap(OpenS
paceExtension.java:368)
at com.parklifegame.ParkLifeOpenSpaceExtension.sendToHome(ParkLifeOpenSp
aceExtension.java:280)
at com.parklifegame.ParkLifeOpenSpaceExtension._handleRequest(ParkLifeOp
enSpaceExtension.java:100)
at com.smartfoxserver.openspace.OpenSpaceExtension.handleRequest(OpenSpa
ceExtension.java:202)
at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.processEve
nt(ExtensionHandler.java:500)
at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.run(Extens
ionHandler.java:344)
at java.lang.Thread.run(Thread.java:619)
- zoomandenhance
- Posts: 13
- Joined: 11 May 2010, 01:59
-
- Posts: 16
- Joined: 09 Aug 2010, 13:49
Map name must be less then 20 characters
I have also problem with this mechanic and want to say that name of map can't be more then 20 symbols, if it more the Smart Fox truncate it.
Last edited by PeredereevBoris on 10 Dec 2010, 08:59, edited 1 time in total.
-
- Posts: 16
- Joined: 09 Aug 2010, 13:49
-
- Posts: 16
- Joined: 09 Aug 2010, 13:49
Return to “OpenSpace v2 discussions and help”
Who is online
Users browsing this forum: No registered users and 11 guests