[ Help | Earliest Comments | Latest Comments ][ List All Subjects of Discussion | Create New Subject of Discussion ][ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]Single Comment The birth of 3 new variants - part 1 : Grand Apothecary Chess Alert[Subject Thread] [Add Response] Aurelian Florea wrote on Mon, May 31, 2021 01:31 PM UTC:@Fergus, I require your help once again. In the preset below: https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+1&settings=Default&submit=Edit I get this error: Syntax Error on line 150 The last expression is 1. In for or foreach, it must evaluate to an array. 149 for (from piece) fn friends 150 for to fn join const alias #piece "-Range" #from 151 if fn const alias #piece #from #to and not fn friend space #to and onboard #to 152 move #from #to 153 if isupper #piece 154 if != const alias #piece White_Joker 155 if != const alias #piece White_Pawn 156 set last_type_moved const alias #piece 157 else 158 set last_type_moved Black_Barren_Pawn 159 endif 160 endif 161 elseif != const alias #piece Black_Joker 162 if != const alias #piece Black_Pawn 163 set last_type_moved const alias #piece 164 else 165 set last_type_moved White_Barren_Pawn 166 endif 167 endif 168 if not sub checked cond == #from #kingpos #to #kingpos 169 setlegal #from #to 170 endif 171 endif 172 restore 173 set last_type_moved #ltm 174 next 175 next
@Fergus,
I require your help once again.
In the preset below:
https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+1&settings=Default&submit=Edit
I get this error: Syntax Error on line 150
The last expression is 1. In for or foreach, it must evaluate to an array.
149 for (from piece) fn friends
150 for to fn join const alias #piece "-Range" #from
151 if fn const alias #piece #from #to and not fn friend space #to and onboard #to
152 move #from #to
153 if isupper #piece
154 if != const alias #piece White_Joker
155 if != const alias #piece White_Pawn
156 set last_type_moved const alias #piece
157 else
158 set last_type_moved Black_Barren_Pawn
159 endif
160 endif
161 elseif != const alias #piece Black_Joker
162 if != const alias #piece Black_Pawn
163 set last_type_moved const alias #piece
164 else
165 set last_type_moved White_Barren_Pawn
166 endif
167 endif
168 if not sub checked cond == #from #kingpos #to #kingpos
169 setlegal #from #to
170 endif
171 endif
172 restore
173 set last_type_moved #ltm
174 next
175 next