Hi, I have been using Antescofo for a little while now and absolutely love the language. However, recently I realized some bizarre behaviour with the switch function. I’ve used it before without any problems whatsoever but for some reason the following code does not work at all. The exact same code with several ifs works perfectly. With the switch function, none of the cases are ever entered. Even by adding a case where > 0 which should include everything does not work. Any ideas of what could be the problem?
Thank you for the help
switch ($note_rand) {
case $note_rand >= 0 && $note_rand <= $note1:
$note := $possible_notes[0]
case $note_rand > $note1 && $note_rand <= ($note1 + $note2):
$note := $possible_notes[1]
case $note_rand > ($note1 + $note2) && $note_rand <= ($note1 + $note2 + $note3):
$note := $possible_notes[2]
case $note_rand > ($note1 + $note2 + $note3) && $note_rand <= ($note1 + $note2 + $note3 + $note4):
$note := $possible_notes[3]
}