Syntax Error on line 0

The findpiece function expects a sequential array. It will not work with an associative array.

Edit the Settings File for Shogi

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 sub postauto1
   1   drop old first Ai Ah Ag Af Ae Ad Ac Ab Aa Bi Bh Bg Bf Be Bd Bc Bb Ba Ci Ch Cg Cf Ce Cd Cc Cb Ca Di Dh Dg Df De Dd Dc Db Da
   2   flip dest
   3   convert dest d r h b v s m l y n t p
   4 endsub
   5 sub postauto2
   6   drop old last Ai Ah Ag Af Ae Ad Ac Ab Aa Bi Bh Bg Bf Be Bd Bc Bb Ba Ci Ch Cg Cf Ce Cd Cc Cb Ca Di Dh Dg Df De Dd Dc Db Da
   7   flip dest
   8   convert dest D R H B V S M L Y N T P
   9 endsub
  10 moveindex 1
  11 MOVE: 7g-7f
  12 postauto1
  13 moveindex 2
  14 MOVE: 8c-8d
  15 postauto2
  16 moveindex 3
  17 MOVE: 6i-7h
  18 postauto1
  19 moveindex 4
  20 MOVE: 8d-8e
  21 postauto2
  22 moveindex 5
  23 MOVE: 5i-6i
  24 postauto1
  25 moveindex 6
  26 MOVE: 8e-8f
  27 postauto2
  28 moveindex 7
  29 MOVE: 8g-8f
  30 postauto1
  31 moveindex 8
  32 MOVE: 8b-8f
  33 postauto2
  34 moveindex 9
  35 MOVE: 7h-7g
  36 postauto1
  37 moveindex 10
  38 MOVE: 8f-8b
  39 postauto2
  40 moveindex 11
  41 MOVE: 4i-5h
  42 postauto1
  43 moveindex 12
  44 MOVE: P*8g
  45 postauto2
  46 moveindex 13
  47 MOVE: 7g-8g
  48 postauto1
  49 moveindex 14
  50 MOVE: 8b-8g
  51 MOVE:  H-8g
  52 postauto2
  53 moveindex 15
  54 MOVE: 7f-7e
  55 postauto1
  56 moveindex 16
  57 MOVE: 3c-3d
  58 postauto2
  59 moveindex 17
  60 MOVE: 5h-5i
  61 postauto1
  62 moveindex 18
  63 MOVE: 8g-6g
  64 postauto2
  65 moveindex 19
  66 MOVE: 2h-6h
  67 postauto1
  68 moveindex 20
  69 MOVE: 6g-5g
  70 postauto2
  71 moveindex 21
  72 MOVE: 6h-6c
  73 MOVE:  d-6c
  74 postauto1
  75 moveindex 22
  76 MOVE: 4a-5b
  77 MOVE:  D-5g
  78 postauto2
  79 moveindex 23
  80 MOVE: 5i-5h
  81 postauto1
  82 moveindex 24
  83 MOVE: 5g-5f
  84 postauto2
  85 moveindex 25
  86 MOVE: 6c-6h
  87 postauto1
  88 moveindex 26
  89 MOVE: 6a-6b
  90 postauto2
  91 moveindex 27
  92 MOVE: p*5g
  93 postauto1
  94 moveindex 28
  95 MOVE: 5f-4e
  96 postauto2
  97 moveindex 29
  98 MOVE: 8h-2b
  99 MOVE:  h-2b
 100 postauto1
 101 moveindex 30
 102 MOVE: 3a-2b
 103 postauto2
 104 moveindex 31
 105 MOVE: b*3f
 106 postauto1
 107 moveindex 32
 108 MOVE: 4e-7e
 109 postauto2
 110 moveindex 33
 111 MOVE: 3f-8a
 112 MOVE:  h-8a
 113 postauto1
 114 moveindex 34
 115 MOVE: 5a-6a
 116 postauto2
 117 moveindex 35
 118 MOVE: 8a-9a
 119 postauto1
 120 moveindex 36
 121 MOVE: B*5d
 122 postauto2
 123 moveindex 37
 124 MOVE: l*7g
 125 postauto1
 126 moveindex 38
 127 MOVE: 7e-8d
 128 postauto2
 129 moveindex 39
 130 MOVE: 7g-7c
 131 MOVE:  m-7c
 132 postauto1
 133 moveindex 51
 134 MOVE: G*4i
 135 postauto2
 136 moveindex 52
 137 MOVE: 7c-6b
 138 postauto1
 139 moveindex 53
 140 MOVE: 7a-6b
 141 postauto2
 142 moveindex 54
 143 MOVE: n*6d
 144 postauto1
 145 moveindex 55
 146 MOVE: 8d-8i
 147 postauto2
 148 moveindex 56
 149 MOVE: g*7b
 150 postauto1
 151 moveindex 57
 152 MOVE: 6a-5a
 153 postauto2
 154 moveindex 58
 155 MOVE: 6d-5b
 156 MOVE:  y-5b
 157 postauto1
 158 moveindex 59
 159 MOVE: 5a-5b
 160 postauto2
 161 moveindex 60
 162 MOVE: 6h-6b
 163 postauto1
 164 end
 165 

functions

uservar

Array ( [0] => Array ( [main] => Array ( [RESULT] => ) ) )

mline

Array ( [0] => MoveLine Object ( [movenum] => 0 [move] => [level] => 0 [comment] => [length] => 0 [newturn] => [turn] => 0 ) [1] => MoveLine Object ( [movenum] => 1 [move] => 7g-7f [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 1 ) [2] => MoveLine Object ( [movenum] => 2 [move] => 8c-8d [level] => 0 [comment] => [length] => 10 [newturn] => [turn] => 1 ) [3] => MoveLine Object ( [movenum] => 3 [move] => 6i-7h [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 2 ) [4] => MoveLine Object ( [movenum] => 4 [move] => 8d-8e [level] => 0 [comment] => [length] => 10 [newturn] => [turn] => 2 ) [5] => MoveLine Object ( [movenum] => 5 [move] => 5i-6i [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 3 ) [6] => MoveLine Object ( [movenum] => 6 [move] => 8e-8f [level] => 0 [comment] => [length] => 10 [newturn] => [turn] => 3 ) [7] => MoveLine Object ( [movenum] => 7 [move] => 8g-8f [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 4 ) [8] => MoveLine Object ( [movenum] => 8 [move] => 8b-8f [level] => 0 [comment] => [length] => 10 [newturn] => [turn] => 4 ) [9] => MoveLine Object ( [movenum] => 9 [move] => 7h-7g [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 5 ) [10] => MoveLine Object ( [movenum] => 10 [move] => 8f-8b [level] => 0 [comment] => [length] => 10 [newturn] => [turn] => 5 ) [11] => MoveLine Object ( [movenum] => 11 [move] => 4i-5h [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 6 ) [12] => MoveLine Object ( [movenum] => 12 [move] => P*8g [level] => 0 [comment] => [length] => 9 [newturn] => [turn] => 6 ) [13] => MoveLine Object ( [movenum] => 13 [move] => 7g-8g [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 7 ) [14] => MoveLine Object ( [movenum] => 14 [move] => 8b-8g; H-8g [level] => 0 [comment] => [length] => 16 [newturn] => [turn] => 7 ) [15] => MoveLine Object ( [movenum] => 15 [move] => 7f-7e [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 8 ) [16] => MoveLine Object ( [movenum] => 16 [move] => 3c-3d [level] => 0 [comment] => [length] => 10 [newturn] => [turn] => 8 ) [17] => MoveLine Object ( [movenum] => 17 [move] => 5h-5i [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 9 ) [18] => MoveLine Object ( [movenum] => 18 [move] => 8g-6g [level] => 0 [comment] => [length] => 10 [newturn] => [turn] => 9 ) [19] => MoveLine Object ( [movenum] => 19 [move] => 2h-6h [level] => 0 [comment] => [length] => 9 [newturn] => 1 [turn] => 10 ) [20] => MoveLine Object ( [movenum] => 20 [move] => 6g-5g [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 10 ) [21] => MoveLine Object ( [movenum] => 21 [move] => 6h-6c; d-6c [level] => 0 [comment] => [length] => 15 [newturn] => 1 [turn] => 11 ) [22] => MoveLine Object ( [movenum] => 22 [move] => 4a-5b; D-5g [level] => 0 [comment] => [length] => 17 [newturn] => [turn] => 11 ) [23] => MoveLine Object ( [movenum] => 23 [move] => 5i-5h [level] => 0 [comment] => [length] => 9 [newturn] => 1 [turn] => 12 ) [24] => MoveLine Object ( [movenum] => 24 [move] => 5g-5f [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 12 ) [25] => MoveLine Object ( [movenum] => 25 [move] => 6c-6h [level] => 0 [comment] => [length] => 9 [newturn] => 1 [turn] => 13 ) [26] => MoveLine Object ( [movenum] => 26 [move] => 6a-6b [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 13 ) [27] => MoveLine Object ( [movenum] => 27 [move] => p*5g [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 14 ) [28] => MoveLine Object ( [movenum] => 28 [move] => 5f-4e [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 14 ) [29] => MoveLine Object ( [movenum] => 29 [move] => 8h-2b; h-2b [level] => 0 [comment] => [length] => 15 [newturn] => 1 [turn] => 15 ) [30] => MoveLine Object ( [movenum] => 30 [move] => 3a-2b [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 15 ) [31] => MoveLine Object ( [movenum] => 31 [move] => b*3f [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 16 ) [32] => MoveLine Object ( [movenum] => 32 [move] => 4e-7e [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 16 ) [33] => MoveLine Object ( [movenum] => 33 [move] => 3f-8a; h-8a [level] => 0 [comment] => [length] => 15 [newturn] => 1 [turn] => 17 ) [34] => MoveLine Object ( [movenum] => 34 [move] => 5a-6a [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 17 ) [35] => MoveLine Object ( [movenum] => 35 [move] => 8a-9a [level] => 0 [comment] => [length] => 9 [newturn] => 1 [turn] => 18 ) [36] => MoveLine Object ( [movenum] => 36 [move] => B*5d [level] => 0 [comment] => [length] => 10 [newturn] => [turn] => 18 ) [37] => MoveLine Object ( [movenum] => 37 [move] => l*7g [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 19 ) [38] => MoveLine Object ( [movenum] => 38 [move] => 7e-8d [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 19 ) [39] => MoveLine Object ( [movenum] => 39 [move] => 7g-7c; m-7c [level] => 0 [comment] => [length] => 15 [newturn] => 1 [turn] => 20 ) [40] => MoveLine Object ( [movenum] => 40 [move] => 6b-7c [level] => 1 [comment] => [length] => 13 [newturn] => [turn] => 20 ) [41] => MoveLine Object ( [movenum] => 41 [move] => m-7c [level] => 1 [comment] => [length] => 10 [newturn] => 1 [turn] => 21 ) [42] => MoveLine Object ( [movenum] => 41 [move] => [level] => 1 [comment] => // It's not letting me back up to move 19, so I'm going to [length] => 60 [newturn] => 1 [turn] => 21 ) [43] => MoveLine Object ( [movenum] => 41 [move] => [level] => 1 [comment] => // redrop the promoted lance. You can drop the gold back [length] => 59 [newturn] => 1 [turn] => 21 ) [44] => MoveLine Object ( [movenum] => 41 [move] => [level] => 1 [comment] => // on 6b, [length] => 11 [newturn] => 1 [turn] => 21 ) [45] => MoveLine Object ( [movenum] => 41 [move] => [level] => 1 [comment] => // then see if you can move, that is, your move should be: [length] => 60 [newturn] => 1 [turn] => 21 ) [46] => MoveLine Object ( [movenum] => 41 [move] => [level] => 1 [comment] => // [length] => 4 [newturn] => 1 [turn] => 21 ) [47] => MoveLine Object ( [movenum] => 41 [move] => [level] => 1 [comment] => // G-6b; XX-XX [length] => 16 [newturn] => 1 [turn] => 21 ) [48] => MoveLine Object ( [movenum] => 41 [move] => [level] => 1 [comment] => // [length] => 4 [newturn] => 1 [turn] => 21 ) [49] => MoveLine Object ( [movenum] => 41 [move] => [level] => 1 [comment] => // See if that works. If it does, we'll be back on track [length] => 59 [newturn] => 1 [turn] => 21 ) [50] => MoveLine Object ( [movenum] => 41 [move] => [level] => 1 [comment] => // again. [length] => 11 [newturn] => 1 [turn] => 21 ) [51] => MoveLine Object ( [movenum] => 42 [move] => G*4i [level] => 0 [comment] => [length] => 10 [newturn] => [turn] => 20 ) [52] => MoveLine Object ( [movenum] => 43 [move] => 7c-6b [level] => 0 [comment] => [length] => 9 [newturn] => 1 [turn] => 21 ) [53] => MoveLine Object ( [movenum] => 44 [move] => 7a-6b [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 21 ) [54] => MoveLine Object ( [movenum] => 45 [move] => n*6d [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 22 ) [55] => MoveLine Object ( [movenum] => 46 [move] => 8d-8i [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 22 ) [56] => MoveLine Object ( [movenum] => 47 [move] => g*7b [level] => 0 [comment] => [length] => 8 [newturn] => 1 [turn] => 23 ) [57] => MoveLine Object ( [movenum] => 48 [move] => 6a-5a [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 23 ) [58] => MoveLine Object ( [movenum] => 49 [move] => 6d-5b; y-5b [level] => 0 [comment] => [length] => 15 [newturn] => 1 [turn] => 24 ) [59] => MoveLine Object ( [movenum] => 50 [move] => 5a-5b [level] => 0 [comment] => [length] => 11 [newturn] => [turn] => 24 ) [60] => MoveLine Object ( [movenum] => 51 [move] => 6h-6b [level] => 0 [comment] => [length] => 9 [newturn] => 1 [turn] => 25 ) )

allmoves

Array ( [0] => moveindex 60;MOVE: 6h-6b;postauto1 [1] => moveindex 59;MOVE: 5a-5b;postauto2 [2] => moveindex 58;MOVE: 6d-5b; MOVE: y-5b;postauto1 [3] => moveindex 57;MOVE: 6a-5a;postauto2 [4] => moveindex 56;MOVE: g*7b;postauto1 [5] => moveindex 55;MOVE: 8d-8i;postauto2 [6] => moveindex 54;MOVE: n*6d;postauto1 [7] => moveindex 53;MOVE: 7a-6b;postauto2 [8] => moveindex 52;MOVE: 7c-6b;postauto1 [9] => moveindex 51;MOVE: G*4i;postauto2 [10] => moveindex 39;MOVE: 7g-7c; MOVE: m-7c;postauto1 [11] => moveindex 38;MOVE: 7e-8d;postauto2 [12] => moveindex 37;MOVE: l*7g;postauto1 [13] => moveindex 36;MOVE: B*5d;postauto2 [14] => moveindex 35;MOVE: 8a-9a;postauto1 [15] => moveindex 34;MOVE: 5a-6a;postauto2 [16] => moveindex 33;MOVE: 3f-8a; MOVE: h-8a;postauto1 [17] => moveindex 32;MOVE: 4e-7e;postauto2 [18] => moveindex 31;MOVE: b*3f;postauto1 [19] => moveindex 30;MOVE: 3a-2b;postauto2 [20] => moveindex 29;MOVE: 8h-2b; MOVE: h-2b;postauto1 [21] => moveindex 28;MOVE: 5f-4e;postauto2 [22] => moveindex 27;MOVE: p*5g;postauto1 [23] => moveindex 26;MOVE: 6a-6b;postauto2 [24] => moveindex 25;MOVE: 6c-6h;postauto1 [25] => moveindex 24;MOVE: 5g-5f;postauto2 [26] => moveindex 23;MOVE: 5i-5h;postauto1 [27] => moveindex 22;MOVE: 4a-5b; MOVE: D-5g;postauto2 [28] => moveindex 21;MOVE: 6h-6c; MOVE: d-6c;postauto1 [29] => moveindex 20;MOVE: 6g-5g;postauto2 [30] => moveindex 19;MOVE: 2h-6h;postauto1 [31] => moveindex 18;MOVE: 8g-6g;postauto2 [32] => moveindex 17;MOVE: 5h-5i;postauto1 [33] => moveindex 16;MOVE: 3c-3d;postauto2 [34] => moveindex 15;MOVE: 7f-7e;postauto1 [35] => moveindex 14;MOVE: 8b-8g; MOVE: H-8g;postauto2 [36] => moveindex 13;MOVE: 7g-8g;postauto1 [37] => moveindex 12;MOVE: P*8g;postauto2 [38] => moveindex 11;MOVE: 4i-5h;postauto1 [39] => moveindex 10;MOVE: 8f-8b;postauto2 [40] => moveindex 9;MOVE: 7h-7g;postauto1 [41] => moveindex 8;MOVE: 8b-8f;postauto2 [42] => moveindex 7;MOVE: 8g-8f;postauto1 [43] => moveindex 6;MOVE: 8e-8f;postauto2 [44] => moveindex 5;MOVE: 5i-6i;postauto1 [45] => moveindex 4;MOVE: 8d-8e;postauto2 [46] => moveindex 3;MOVE: 6i-7h;postauto1 [47] => moveindex 2;MOVE: 8c-8d;postauto2 [48] => moveindex 1;MOVE: 7g-7f;postauto1 )

movelist

1. 7g-7f 1... 8c-8d 2. 6i-7h 2... 8d-8e 3. 5i-6i 3... 8e-8f 4. 8g-8f 4... 8b-8f 5. 7h-7g 5... 8f-8b 6. 4i-5h 6... P*8g 7. 7g-8g 7... 8b-8g; H-8g 8. 7f-7e 8... 3c-3d 9. 5h-5i 9... 8g-6g 10. 2h-6h 10... 6g-5g 11. 6h-6c; d-6c 11... 4a-5b; D-5g 12. 5i-5h 12... 5g-5f 13. 6c-6h 13... 6a-6b 14. p*5g 14... 5f-4e 15. 8h-2b; h-2b 15... 3a-2b 16. b*3f 16... 4e-7e 17. 3f-8a; h-8a 17... 5a-6a 18. 8a-9a 18... B*5d 19. l*7g 19... 7e-8d 20. 7g-7c; m-7c | 20... 6b-7c | 21. m-7c | // It's not letting me back up to move 19, so I'm going to | // redrop the promoted lance. You can drop the gold back | // on 6b, | // then see if you can move, that is, your move should be: | // | // G-6b; XX-XX | // | // See if that works. If it does, we'll be back on track | // again. 20... G*4i 21. 7c-6b 21... 7a-6b 22. n*6d 22... 8d-8i 23. g*7b 23... 6a-5a 24. 6d-5b; y-5b 24... 5a-5b 25. 6h-6b

constants

Array ( )