Talk:Complete Roguelike Tutorial, using python+libtcod, part 2

From RogueBasin
Revision as of 17:54, 9 October 2012 by Lakersforce (talk | contribs)
Jump to navigation Jump to search

I don't want to go editing a tutorial when I'm just a newb myself, but I had to engage in an annoying bughunt before I realized that there were not one but two underscores on either side of the "__init__" part of the object definitions. Maybe I'm just green and this sort of thing should be obvious, but I'd suggest someone with a little more familiarity could weigh in and decide to edit the tutorial to point this fact out or just tell me that I'm a n00b.

I added the note; sorry for the late reply. Nnz 00:30, 24 August 2011 (CEST)

Eh...isn't map a built-in function? That could be problematic. Nnz 00:30, 24 August 2011 (CEST)

At the end of this tutorial part, the code fails with (using python2.7.3 on Ubuntu 12.04 amd64):

 Traceback (most recent call last):
   File "firstrl.py", line 125, in <module>
     render_all()
   File "firstrl.py", line 68, in render_all
     wall = map[x][y].block_sight
 TypeError: 'builtin_function_or_method' object has no attribute '__getitem__'