PDA

View Full Version : programming syntax error - HELP PLEASE


RafaelMancini
04-25-2007, 05:41 AM
Hey there...

Iīm trying to build an expressions that goes like this:

if (ctrl_FootLf.Tap > < 0) {
ikHandleToeLf.ikBlend = 0;
} else {
ikHandleToeLf.ikBlend = 1;
}


But there's a syntax error here: "(ctrl_FootLf.Tap > < 0)", cause you canīt use "<" and ">" at the same time, which I donīt get it, because you can use them with the "=" like this: "(ctrl_FootLf.Tap >= 0)"

So the question is, how do I write this expression in a way that the "ikHandleToeLf.ikBlend" will be only equal to 1 if "ctrl_FootLf.Tap" is equal to 0, otherwise, "ikHandleToeLf.ikBlend" will be equal to 0.

hopefully I was clear about this... can anyone help me please?

Ruramuq
04-25-2007, 07:17 AM
in the help file look for "Comparison Expressions" :

<compare_operand> == <compare_operand> -- equal
<compare_operand> != <compare_operand> -- not equal
<compare_operand> > <compare_operand> -- greater than
<compare_operand> < <compare_operand> -- less than
<compare_operand> >= <compare_operand> -- greater than or equal
<compare_operand> <= <compare_operand> -- less than or equal

if (ctrl_FootLf.Tap != 0)

RafaelMancini
04-25-2007, 05:00 PM
Thanks man! Iīm still learning about programming, and so I always end up getting this kind of problems...

CGTalk Moderation
04-25-2007, 05:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.