Sanny Builder
In English
Search
⌃K

0071: Incorrect number of conditions

A conditional statement exceeds the number of conditions allowed per one statement. The maximum number of conditions combined with the AND or OR operation is 9.
Possible solutions: split the conditional statement so that no statement has more than 9 conditions.
Transforming conditional statements while preserving the logical relation between conditions can be achieved by extracting the conditions into a separate subroutine as demonstrated below.
AND:
// before
if and
[email protected] == 1 // error, too many conditions
[email protected] == 1 // error, too many conditions
then
// then code
else
// else code
end
// after
if
gosub @check
then
// then code
else
// else code
end
:check
if and
then
if and
then
return
end
end
return
OR:
// before
if or
[email protected] == 10 // error, too many conditions
[email protected] == 11 // error, too many conditions
then
// then code
else
// else code
end
// after
if
gosub @check
then
// then code
else
// else code
end
:check
if or
then
return
end
if or
then
return
end
return