1
Programming / Re: newbie asking for help
« on: October 02, 2011, 01:23:38 AM »
line 85 of your code.
should be
you left out the period between player.x and player.y, so instead of looking at the the x and y attributes of the Object Instance known as 'player', the program was looking for variables named playerx and playery, variables that don't exist. Since those variables don't exist, the program crashes when it is told to use them.
Code: [Select]
libtcod.console_print_left(0, playerx, playery, libtcod.BKGND_NONE, ' ')
should be
Code: [Select]
libtcod.console_print_left(0, player.x, player.y, libtcod.BKGND_NONE, ' ')
you left out the period between player.x and player.y, so instead of looking at the the x and y attributes of the Object Instance known as 'player', the program was looking for variables named playerx and playery, variables that don't exist. Since those variables don't exist, the program crashes when it is told to use them.