Hi Laatwaai and welcome to thinBasic community forum.
What exactly is not working?
Do you get a runtime error message?
Or are you haveing un-expected results?
There are two kind of IF ... statements: single line or multiple line
Single line it means all the IF statement must be on a single line
Multiple lines means the IF statement must finish with a END IF
Your example seems breaking single line rule.
Anyway, any more info would be precious to try to understand the problem.