skirwan / clan-lord-client-issues

Bug tracking for Clieunk
2 stars 0 forks source link

DT client doesn't throw error for a missing 'if' in an 'end if' statement. #152

Closed dricard closed 3 years ago

dricard commented 3 years ago

Some of the errors I got was for code like this:

speak_dwarven
{
    if @text != ""
        "/speak dwarven"\r
        @text \r
        "/speak common"\r
        goto the_end
    else
        "/speak dwarven"\r
        message "* Use '/spc' to start speaking common again"
    end

    label the_end
}

Of course the last endstatement is missing an if, as in end if but DT client is fine with that apparently.

skirwan commented 3 years ago

I think in A38 this should work but complain on load (🤞 ). Mind checking?

dricard commented 3 years ago

I did a check on the DT client and it does complain, but on execution only (not at load time). `MACRO Syntax Error No closing "end if" found. It does not continu execution passed the 'end' but it does execute the if/end code, including looping through it. So, same behaviour on both clients as far as I can tell. 👍