게임 엔진으로 파이썬에서 텍스트 모험을하려고합니다. 어쨌든이 오류 메시지가 계속 나타납니다.파이썬의 매개 변수 오류 - 텍스트 어드벤처 게임
이from engine import game
from engine import event
from engine import place
class TextAdventureGame(game):
def __init__(self):
super(TextAdventureGame, self).__init__()
self.introduction = ('''Welcome to Can You Escape text adventure game.
You wake up in a dark room and you have no idea where you are.''')
왜이 오류가 발생 : 여기
TypeError: module.__init__() takes at most 2 arguments (3 given)
내 코드?
class TextAdventureGame(game): TypeError: module.__init__() takes at most 2 arguments (3 given)
클래스를 인스턴스화하는 방법은 무엇입니까? –
질문의 제목을 구체적인 문제를 반영하는 것으로 변경하십시오. –
1 : 전체 코드입니까? 2 :'super (TextAdventureGame, self) .__ init __()'을 제거하면 같은 오류가 발생합니까? –