Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Module attribute problems.
#1
I'm trying to run this script :

Code:
import libtcodpy as libtcod

#actual size of the window
SCREEN_WIDTH = 80
SCREEN_HEIGHT = 50

LIMIT_FPS = 20  #20 frames-per-second maximum


libtcod.console_set_custom_font('arial10x10.png', libtcod.FONT_TYPE_GREYSCALE | libtcod.FONT_LAYOUT_TCOD)

libtcod.console_init_root(SCREEN_WIDTH, SCREEN_HEIGHT, 'python/libtcod tutorial', False)

libtcod.sys_set_fps(LIMIT_FPS)

while not libtcod.console_is_window_closed():

    libtcod.console_set_default_foreground(0, libtcod.white)

    libtcod.console_put_char(0, 1, 1, '@', libtcod.BKGND_NONE)

    libtcod.console_flush()

The result from runnign the script is:

Code:
Traceback (most recent call last):
  File "C:\Documents and Settings\Konstantin\Desktop\firstrl.py\libtcodpy.py", line 1, in <module>
    import libtcodpy as libtcod
  File "C:\Documents and Settings\Konstantin\Desktop\firstrl.py\libtcodpy.py", line 10, in <module>
    libtcod.console_set_custom_font('arial10x10.png', libtcod.FONT_TYPE_GREYSCALE | libtcod.FONT_LAYOUT_TCOD)
AttributeError: 'module' object has no attribute 'console_set_custom_font'

What exactly am i doing wrong? Where can i get that attribute that module requires?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: attribute of type 'NoneType' is not callable object chris0147 0 961 09-05-2014, 07:42 PM
Last Post: chris0147
  Regex module help Mikey1234567 0 595 04-18-2013, 11:48 AM
Last Post: Mikey1234567
  'X' object has no attribute 'y' band_master 1 1,094 04-23-2012, 09:54 PM
Last Post: band_master
  My Doc Module nevets04 0 557 11-19-2009, 04:55 PM
Last Post: nevets04
  Web Search Module Gaijin 0 523 11-03-2009, 09:24 AM
Last Post: Gaijin

Forum Jump:


Users browsing this thread: 1 Guest(s)