Please report any bugs or errors to J Paleja
Syntax Error on line 80
stalemated is not the name of any known subroutine in your program
Edit the Settings File for Archbishop Chess Advanced
For the sake of debugging, here is the full GAME Code program that this error occurred in. The lines have been properly indented to help you spot scope errors.
0 if == thismove null 1 say This preset enforces the rules and displays legal moves. 2 endif 3 echo Please report any bugs or errors to J Paleja 4 setflag a1 a8 h1 h8 e1 e8 5 set k findpiece k spaces 6 set K findpiece K spaces 7 set ep false 8 set names assoc p "Black Pawn" P "White Pawn" n "Black Knight" N "White Knight" b "Black Bishop" B "White Bishop" _nw_eh "Black Eohippo" _NW_EH "White Eohippo" r "Black Rook" R "White Rook" a "Black Archbishop" A "White Archbishop" k "Black King" K "White King" 9 alias E _NW_EH e _nw_eh 10 def White_Eohippo checkleap #0 #1 1 2 or checkaleap #0 #1 0 -1 or checkaleap #0 #1 1 0 11 def White_Bishop checkride #0 #1 1 1 12 def White_Rook checkride #0 #1 1 0 13 def White_Archbishop fn White_Bishop #0 #1 or checkleap #0 #1 1 2 14 def Black_Eohippo checkleap #0 #1 1 2 or checkaleap #0 #1 0 -1 or checkaleap #0 #1 1 0 15 def Black_Bishop checkride #0 #1 1 1 16 def Black_Rook checkride #0 #1 1 0 17 def Black_Archbishop fn White_Archbishop #0 #1 18 def White_Pawn remove var ep and < rankname #1 var bpr and < rankname var ep rankname #1 and == filename var ep filename #1 or and checkride #0 #1 0 1 == rankname #0 var wpr or checkleap #0 #1 0 1 and empty #1 or and islower space #1 checkleap #0 #1 1 1 and <= distance #0 #1 var fps and > rank #1 rank #0 19 def Black_Pawn remove var ep and > rankname #1 var wpr and > rankname var ep rankname #1 and == filename var ep filename #1 and checkleap #0 #1 1 1 or and checkride #0 #1 0 1 == rankname #0 var bpr or checkleap #0 #1 0 1 and empty #1 or and isupper space #1 checkleap #0 #1 1 1 and <= distance #0 #1 var fps and < rank #1 rank #0 20 sub postauto1 21 if isupper old 22 die You may not capture your own pieces. 23 elseif islower moved 24 die You may not move one of your opponent's pieces. 25 endif 26 if != moved P 27 set ep false 28 if != space dest moved 29 die You may not change the type of this piece. 30 elseif capture 31 set nopvc 0 32 else 33 inc nopvc 34 endif 35 endif 36 if sub moved origin dest and match moved P K 37 elseif fn moved origin dest and match moved A R E B N 38 else 39 die You may not move a moved from origin to dest 40 endif 41 if sub checked #K 42 die You may not move into check. 43 endif 44 unsetflag origin dest 45 set posvar join "w" join fencode boardflags 46 inc #posvar 47 endsub 48 sub postauto2 49 if islower old 50 die You may not capture your own pieces. 51 elseif isupper moved 52 die You may not move one of your opponent's pieces. 53 endif 54 if != moved p 55 set ep false 56 if != space dest moved 57 die You may not change the type of this piece. 58 elseif capture 59 set nopvc 0 60 else 61 inc nopvc 62 endif 63 endif 64 if sub moved origin dest and match moved p k 65 elseif fn moved origin dest and match moved a r e b n 66 else 67 die You may not move a moved from origin to dest 68 endif 69 if sub checked #k 70 die You may not move into check. 71 endif 72 unsetflag origin dest 73 set posvar join "b" join fencode boardflags 74 inc #posvar 75 endsub 76 set posvar join "b" join fencode boardflags 77 if >= var #posvar 3 78 say Three Times Repetition! Drawn Game! 79 drawn 80 elseif sub stalemated #K 81 if sub checked #K 82 say Checkmate! Black has won! 83 won 84 else 85 say Stalemate! The game is drawn. 86 drawn 87 endif 88 elseif >= #nopvc 100 89 say Fifty Moves Without Moving a Pawn or Capturing! Game Drawn! 90 drawn 91 elseif sub checked #K 92 say Check! 93 endif 94 end 95functions
Array ( [White_Eohippo] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 2 [5] => or [6] => checkaleap [7] => #0 [8] => #1 [9] => 0 [10] => -1 [11] => or [12] => checkaleap [13] => #0 [14] => #1 [15] => 1 [16] => 0 ) [White_Bishop] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 1 ) [White_Rook] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 0 ) [White_Archbishop] => Array ( [0] => fn [1] => White_Bishop [2] => #0 [3] => #1 [4] => or [5] => checkleap [6] => #0 [7] => #1 [8] => 1 [9] => 2 ) [Black_Eohippo] => Array ( [0] => checkleap [1] => #0 [2] => #1 [3] => 1 [4] => 2 [5] => or [6] => checkaleap [7] => #0 [8] => #1 [9] => 0 [10] => -1 [11] => or [12] => checkaleap [13] => #0 [14] => #1 [15] => 1 [16] => 0 ) [Black_Bishop] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 1 ) [Black_Rook] => Array ( [0] => checkride [1] => #0 [2] => #1 [3] => 1 [4] => 0 ) [Black_Archbishop] => Array ( [0] => fn [1] => White_Archbishop [2] => #0 [3] => #1 ) [White_Pawn] => Array ( [0] => remove [1] => var [2] => ep [3] => and [4] => < [5] => rankname [6] => #1 [7] => var [8] => bpr [9] => and [10] => < [11] => rankname [12] => var [13] => ep [14] => rankname [15] => #1 [16] => and [17] => == [18] => filename [19] => var [20] => ep [21] => filename [22] => #1 [23] => or [24] => and [25] => checkride [26] => #0 [27] => #1 [28] => 0 [29] => 1 [30] => == [31] => rankname [32] => #0 [33] => var [34] => wpr [35] => or [36] => checkleap [37] => #0 [38] => #1 [39] => 0 [40] => 1 [41] => and [42] => empty [43] => #1 [44] => or [45] => and [46] => islower [47] => space [48] => #1 [49] => checkleap [50] => #0 [51] => #1 [52] => 1 [53] => 1 [54] => and [55] => <= [56] => distance [57] => #0 [58] => #1 [59] => var [60] => fps [61] => and [62] => > [63] => rank [64] => #1 [65] => rank [66] => #0 ) [Black_Pawn] => Array ( [0] => remove [1] => var [2] => ep [3] => and [4] => > [5] => rankname [6] => #1 [7] => var [8] => wpr [9] => and [10] => > [11] => rankname [12] => var [13] => ep [14] => rankname [15] => #1 [16] => and [17] => == [18] => filename [19] => var [20] => ep [21] => filename [22] => #1 [23] => and [24] => checkleap [25] => #0 [26] => #1 [27] => 1 [28] => 1 [29] => or [30] => and [31] => checkride [32] => #0 [33] => #1 [34] => 0 [35] => 1 [36] => == [37] => rankname [38] => #0 [39] => var [40] => bpr [41] => or [42] => checkleap [43] => #0 [44] => #1 [45] => 0 [46] => 1 [47] => and [48] => empty [49] => #1 [50] => or [51] => and [52] => isupper [53] => space [54] => #1 [55] => checkleap [56] => #0 [57] => #1 [58] => 1 [59] => 1 [60] => and [61] => <= [62] => distance [63] => #0 [64] => #1 [65] => var [66] => fps [67] => and [68] => < [69] => rank [70] => #1 [71] => rank [72] => #0 ) )uservar
Array ( [0] => Array ( [main] => Array ( [k] => e8 [K] => e1 [ep] => [names] => Array ( [p] => Black Pawn [P] => White Pawn [n] => Black Knight [N] => White Knight [b] => Black Bishop [B] => White Bishop [_nw_eh] => Black Eohippo [_NW_EH] => White Eohippo [r] => Black Rook [R] => White Rook [a] => Black Archbishop [A] => White Archbishop [k] => Black King [K] => White King ) [posvar] => br{_nw_eh}bakb{_nw_eh}rpppppppp32PPPPPPPPR{_NW_EH}BAKB{_NW_EH}R,a1,a8,e1,e8,h1,h8 ) ) )mline
Array ( [0] => MoveLine Object ( [movenum] => 0 [move] => [level] => 0 [comment] => [length] => 0 [newturn] => [turn] => 0 ) )allmoves
Array ( )movelist
constants
Array ( )