| Author |
Message |
David Eugene Whitcher (Dralius)
| | Posted on Saturday, October 12, 2002 - 7:02 am: | |
I am getting an error related to my not-in-zone? check. Could someone tell me what i am doing wrong. (define slide-jump ($1 ( while empty? $1) $1 ( verify not-friend?)( verify not-in-zone? my-zone ) add)) I need the piece to never end it's move in the zone. Thanks in advance. Dralius |
Dan Troyka (Dtroyka)
| | Posted on Sunday, October 13, 2002 - 7:22 am: | |
Try an extra set of parentheses around (not-in-zone? my-zone), so that the test becomes: (verify (not-in-zone? my-zone)). Basically Zillions requires any ? test that takes an argument to be set off in parentheses. |
Don Rogers (Patzer42)
| | Posted on Sunday, October 13, 2002 - 9:54 am: | |
Two other problems, I think. First, the syntax for while is: (while condition instruction ... instruction) In your code, the while statement does not have any "add" instruction inside it, so I think at best your code will generate only one possible move. Second, I assume you may want your piece to be able to slide through the named zone, a long as it doesn't stop within the zone. In that case, you don't want to use verify, which shuts down the move block as soon as it evaluates to false; use an "if" statement there instead. I think this may be what you want: (define slide ($1 (while empty? (if (not-in-zone? my-zone) add) $1 ) ) (verify not-friend?) (verify (not-in-zone? my-zone)) add ) |
David Eugene Whitcher (Dralius)
| | Posted on Monday, October 14, 2002 - 7:50 am: | |
Dear Dan & Don Thank you for your quick reply. The problem was with the parenthesis. To Dan thank you for helping me understand the script syntax. To Don i appreciate you showing me and others who are novices how to construct a proper move definition. Altho i will not need it for this game i have added it to my reference book. Credit will be listed in the .zrf as i hope to post the game once i have the graphics completed. |
|