CLEO Help "If greater than" condition issue

CLEO related
Status
Not open for further replies.

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
Code:
if        
23@ > 20@ 
then 
 
Sanny builder doesn't allow me to simply compare 2 variables, is there any other way to do it? Both of the variables are relative and depend on the position where the mod is activated so I can't simply put a number instead of one variable.
           
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
monday link said:
Code:
if        
23@ > 20@ 
then 
 
Sanny builder doesn't allow me to simply compare 2 variables, is there any other way to do it? Both of the variables are relative and depend on the position where the mod is activated so I can't simply put a number instead of one variable.
           
I made this thing in my godmode and it's work so try this.
Code:
0029:   2@ >= 1@

Or this
Code:
0019:   0@ > 1@
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
You need to defined the variables as integer/float etc. Either using opcodes like 001D(for integers) and 0025(for floats) or simply define them before the main script using var/end syntax.

Code:
var
23@ : int
20@ : float
end
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
springfield link said:
You need to defined the variables as integer/float etc. Either using opcodes like 001D(for integers) and 0025(for floats) or simply define them before the main script using var/end syntax.

Code:
var
23@ : int
20@ : float
end

As spring said, you can't compare 2 or more vars like any language , you must use specific opcodes that allow you to do math stuff
 
Status
Not open for further replies.
Top