Skip to content

Tile Array index counter doesn't reset when user is returned to the opposite side of the map. #1

@Xovan

Description

@Xovan

When you walk off the edge of the map it returns you to the opposite side
of the map but does not reset its index counters causing it to go outside
the range of the array.

=======================ERROR==========================================

Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2
Type "copyright", "credits" or "license()" for more information.

****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface.  This connection is not visible on any external
interface and no data is sent to or received from the Internet.
****************************************************************

IDLE 2.6.6 ==== No Subprocess ====

Traceback (most recent call last):
File "/home/matt4525/Pygame/jpulec-My--RPG-74aebe0/Game.py", line 335, in
game.mainloop()
File "/home/matt4525/Pygame/jpulec-My--RPG-74aebe0/Game.py", line 61, in mainloop
self.drawWorld()
File "/home/matt4525/Pygame/jpulec-My--RPG-74aebe0/Game.py", line 271, in drawWorld
self.map.drawMap()
File "/home/matt4525/Pygame/jpulec-My--RPG-74aebe0/Map.py", line 260, in drawMap
self.currentPiece.array[x][y] = self.allTiles[-self.Xoff/24 + x + self.startPieceOffsetX][-self.Yoff/24 + y + self.startPieceOffsetY]
IndexError: list index out of range

=======================ERROR==========================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions