The Chess Variant Pages




[ 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

About Game Courier. Web-based system for playing many different variants by email or in real-time.[All Comments] [Add Comment or Rating]
Armin Liebhart wrote on 2022-02-21 UTC

Hello, for some reason i get the following error message in a game of judkin shogi:

Syntax Error on line 587

The cond operator requires at least three arguments.

Since that line is from the shogi include file, which i suppose was well checked, i don't know how i could possibly correct that. Who can tell me, what's the problem? I copy and paste the relevant part (from the pawndropcheckmate subroutine - even though i didn't use a pawn in my move) the relevant line is the one with an arrow.

sub pawndropcheckmate pawn spot:
    my allies;
    local king kingmoves black test to;
    verify empty #spot and onboard #spot;
    if == #pawn P:
        set king where #spot 0 -1;
        set black true;
    else:
        set king where #spot 0 1;
        set black false;
    endif;
    verify == space #king cond #black k K;
    set kingmoves merge leaps #king 1 0 leaps # 1 1;
    for to #kingmoves:
------>     if not cond #black islower isupper space #to or empty #to and onboard #to:
            move #king #to;
            set checked fn cond #black ATTACKEDBYW ATTACKEDBYB #to;
            restore;
            verify #checked;
        endif;

Thank you, Armin