Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Xovan opened this issue Aug 22, 2011 · 1 comment

Comments

@Xovan
Copy link
Collaborator

Xovan commented Aug 22, 2011

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==========================================

@jpulec
Copy link
Owner

jpulec commented Aug 22, 2011

This is a problem that I've really put on the backend for now but is important. Note that the map tiles do repeat themselves several times before the map actually loops.

@jpulec jpulec closed this as completed Aug 22, 2011
@jpulec jpulec reopened this Aug 22, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants