I am using Python 26 on a Windows XP

OK, here are the three lines mentioned following the error message.

Traceback (most recent call last):
  File "C:\Python26\TicTacToeD.py", line 165, in <module>
    main()
  File "C:\Python26\TicTacToeD.py", line 150, in main
    DisplayBoard(board)
  File "C:\Python26\TicTacToeD.py", line 68, in DisplayBoard
    print "\n\t", board[1], "|", board[2], "|", board[3]
TypeError: 'function' object is unsubscriptable


line 165 = main()

def main():
    DisplayInstruct()
    puter, human = Pieces()
    turn = X
    board = NewBoard
    DisplayBoard(board)

line 150 = DisplayBoard(board)

line 69
def DisplayBoard(board):
    """Display board on screen."""
    print "\n\t", board[1], "|", board[2], "|", board[3]
    print "\t", "______"
    print "\t", board[4], "|", board[5], "|", board[6]
    print "\t", "______"
    print "\t", board[7], "|", board[8], "|", board[9], "\n"

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to