rn216

few conditional rule questions

Discussion created by rn216 on Jul 8, 2012
Latest reply on Jul 10, 2012 by rn216
Hi,
My first question is:
Why is it not possible to instruct other rules prior to a conditional statement without the script marking the conditional statment as an error?
ex:
 alignScopeToAxes(y)
 s(assetSize("assets/facades/gazeboBeam_1.obj", "x"),assetSize("assets/facades/gazeboBeam_1.obj", "y"),assetSize("assets/facades/gazeboBeam_1.obj", "z"))
 i("assets/facades/gazeboBeam_1.obj")

              case pos == "center_xz":
                    center(xz)
              case pos == "right":
                    t('scope.sx - (assetSize("assets/facades/gazeboBeam_1.obj", "x") / 2), 0, 0)
              else:
                    DoNothing


My second question:
With the same code above, if I do not include an else statement, that as well causes the script to mark it as an error. Why is this so? Haven't the developers of CityEngine ever heard of if statements that do not include an else condition?

Outcomes