Sanny Builder Bug Tracker - Sanny Builder
View Issue Details
0000026Sanny Builder[All Projects] compilerpublic2014-04-13 17:572014-04-13 17:59
Seemann 
Seemann 
normalmajoralways
resolvedfixed 
3.2.0 
3.2.13.2.1 
0000026: a single IF condition with a number on the left parsed as an IF parameter
When you use a single condition with the IF keyword on the same line and this condition begins with a number, the compiler threats this number as a parameter for the IF opcode.

WHILE TRUE
    IF 3 > 0@
    ELSE_DO BREAK
    IF 6 > $5779(0@,3i)
    THEN
        SET_CHAR_HEALTH $5622(0@,3i) 0
    END
    0@ += 1
END

After the IF 3 > 0@ line the compiler expects four conditions to follow, but there's only one, thus an error message appears.

Until it's fixed possible solutions to avoid this bug are:
1. let the IF keyword be alone on the line, and a condition goes next line:
    IF
    3 > 0@
    ELSE_DO BREAK
2. use an opcode after the IF keyword

    IF 001B: 3 > 0@
    ELSE_DO BREAK
No tags attached.
Issue History
2014-04-13 17:57SeemannNew Issue
2014-04-13 17:57SeemannStatusnew => assigned
2014-04-13 17:57SeemannAssigned To => Seemann
2014-04-13 17:59SeemannStatusassigned => resolved
2014-04-13 17:59SeemannFixed in Version => 3.2.1
2014-04-13 17:59SeemannResolutionopen => fixed

There are no notes attached to this issue.