Why am I getting an existance error in prolog

59 views Asked by At

I'm trying to call a function in prolog, and I keep getting the same error and I can't understand why.

(GameOption =:= 1 -> play_game(4); GameOption =:= 2 -> playgamevscomputer(4))
playgamevscomputer(X):-
    initial_board(X, Board),
    displaygamevscomputer(X, Board, red).

! Existence error in user:playgamevscomputer/1
! procedure user:playgamevscomputer/1 does not exist
! goal:  user:playgamevscomputer(4)

I tried changing the name, and body of the function but nothing seems to work

0

There are 0 answers