[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
You are on the backup site for Chessvariants.com. Any posts, moves, or other changes you make here will not be permanent, because the pages and database from the main site will be backed up here every midnight EST. Additionally, things may not be working right, because this site is also a testbed for newer system software. So, if you are not here to test, develop, or merely read this site, you may want to change .org to .com in the navigation bar and go to the main site.
I seem to have gotten it to work now. I changed
Remember that Game Courier reads all of this backwards, and this is just one of two Pawn functions. The first change I made was to the logic of the function. I put an and in front of the second to last operation,
checkleap #0 #1 1 1
, so that nothing would be left on the stack when it got to the last operation. Since it still didn't work, I changed#ep
tovar ep
. That worked. Now, why would I needvar ep
but get away with using#wpr
. The difference is that wpr is effectively a constant, keeping the same value throughout execution of the program. So, when I define the function,wpr
already has the value I will need it to have whenever I use the function. Butep
is a true variable whose value keeps changing. To make sure the function uses its current value, I need to usevar ep
instead of#ep
.The
remove
built-in function is a new one for removing a piece from a space. It exits automatically with the value of an assignment to '@'. Most built-in functions do not change anything, focusing instead on returning values. But I wanted to check possible Pawn moves with a function alone instead of using a subroutine.