Notifications
Clear all
[Closed] Quick syntax check
Jan 05, 2019 2:39 pm
Hi sorry for the noobish-ness
I was trying out a simple if condition to test if my object had a certain controller. but i keep getting undefined…
if $.rotation.controller == Euler_XYZ do print "it has it"
-- returns undefined
x = $.rotation.controller as string
y = "Controller:Euler_XYZ"
if x == y do print "see? theyere the same"
-- returns "see? theyere the same"
Why is this happening? the selected object’s rotation controller IS in fact Euler XYZ, but why am I getting an undefined result? in the latter example, after just turning them into strings I’m getting the correct output.
How do I correct the syntax in the first if line?
1 Reply
Jan 05, 2019 2:39 pm
nvm, came across a pre 2010 post that the if is missing a classof statement