i need something like this but is invalid syntax in Quickbms
Code: Select all
get var long
if var < 4
var = 4
elif var > 4 and < 8
var = 8
elif var > 8 and < 12
var = 12
endif
Code: Select all
elif var greater than this and less than this
var equals this
so is there another way to put that so it works in a bms script?
thanks for any help!
edit
nevermind i found another way
Code: Select all
get var long
xmath check "var % 4"
if check == 3
math var + 1
elif check == 2
math var + 2
elif check == 1
math var + 3
endif
another shorter way
Code: Select all
get var long
xmath check "var % 4"
if check != 0
xmath var "var - check + 4"
endif
and even yet shorter way
Code: Select all
get var long
math var x 4