Multiple conditions in an IF statement
Asyranok
28 Mar 2013, 00:55What is wrong with this...
That would cause this error...
Thanks. I'm assuming it is a simply syntax or code misunderstanding on my part.
Thanks.
if (Rod 1A.position = False and Rod 2A.position = False ) {
msg (("{img:rodA.png} {img:rodB.png}"))
}
That would cause this error...
Error running script: Error compiling expression 'Rod 1A.position = False and Rod 2A.position = False ': CompareElement: Operation 'Equal' is not defined for types 'String' and 'Boolean'
Thanks. I'm assuming it is a simply syntax or code misunderstanding on my part.
Thanks.
HegemonKhan
28 Mar 2013, 04:19I think this means that in your syntax~code, you've got:
string = boolean, which obviously creates an error as a string is not a boolean (and vice versa).
but, I'm not sure what or how you change it to get it to work as:
string = string
~OR~
boolean = boolean
string = boolean, which obviously creates an error as a string is not a boolean (and vice versa).
but, I'm not sure what or how you change it to get it to work as:
string = string
~OR~
boolean = boolean

jaynabonne
28 Mar 2013, 12:31It seems to be saying that your "position" attribute is a string, not a boolean. Be sure when you define the position attribute that you do:
<position type="boolean">false</position>
or something like that.
<position type="boolean">false</position>
or something like that.
Asyranok
29 Mar 2013, 02:13Got it! Thanks 
