7800-devtools / 7800basic

a BASIC-like language for creating games that run on the Atari 7800 console.
Other
23 stars 3 forks source link

complex if statement #19

Closed ghost closed 10 months ago

ghost commented 10 months ago

I am attempting a check for an event to occur if 4 different conditions are true, but it seems that 7800 Basic can only test for two conditions with an if statement. Have any suggestions for a work around?

msaarna commented 10 months ago

Not sure of the precise issue you're running in to, but there are some limitations on compound if...thens documented in the manual.

To work around, you can break up your if...then into multiple if...thens testing for FAlLSE.

if !A then skipaction if !B then skipaction if !C then skipaction rem if we're here, A B and C are true skipaction