On Mon, May 23, 2011 at 9:28 AM, Max P <[email protected]> wrote:
> Hello,
> I just try to find out, how to formulate a XML file for a HexMap. I
> currently have the following code for defining the map:
>
> <hexmap id="level1" tile_height="25">
> <column>
> <cell tile="street" />
> </column>
> </hexmap>
>
> I load the file with resource = load('resources.xml') , but the
> application crashes with the following error stack:
>
> File "build/bdist.macosx-10.6-universal/egg/cocos/tiles.py", line 413,
> in load
> File "build/bdist.macosx-10.6-universal/egg/cocos/tiles.py", line
> 304, in __init__
> File "build/bdist.macosx-10.6-universal/egg/cocos/tiles.py", line
> 336, in handle
> File "build/bdist.macosx-10.6-universal/egg/cocos/tiles.py", line
> 316, in resource_factory
> File "build/bdist.macosx-10.6-universal/egg/cocos/tiles.py", line
> 336, in handle
> File "build/bdist.macosx-10.6-universal/egg/cocos/tiles.py", line
> 645, in hexmap_factory
> File "build/bdist.macosx-10.6-universal/egg/cocos/tiles.py", line
> 1264, in __init__
> TypeError: __init__() takes at least 4 arguments (2 given)
>
> Did I forget some attributes for the <hexmap> tag? How do i formulate
> a HexMap XML definition correctly?
>
> Thx, Max
>
>
I'm not so much familiar with tiles.py, but it seems to me there is a bug
there.
Look up near the line the traceback points, you will see (docstring
stripped):
class HexMapLayer(HexMap, MapLayer):
def __init__(self, id, th, cells, origin=None, properties=None):
HexMap.__init__(self, id, th, cells, origin, properties)
HexMapLayer.__init__(self, properties)
I think the last line should be
MapLayer.__init__(self, properties)
Richard ?
--
claudio
--
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cocos-discuss?hl=en.