ID:179044
 
is there a way I can attach a verb to an object and mak an if command with a greater than one symbol for instance

deskthree
icon = 'podium.dmi'
icon_state = "deskthree"
name = "desk"
density = 0
verb/sit()
set src in oview (0)
if(usr.cl == <1)
usr.cl += 1
usr.cp += 2
usr << "...."
else
usr << "...."

if the var cl is more than one I want it to do somethig
but if its not greater than 1 I want it to do something else
Look up >= in the reference.
In response to Nadrew
1 if A is greater or equal to B; 0 otherwise.
If A and B are text strings, a case sensitive comparison is performed (like sortText()).

does this mean I have to put in

if(usr.cl == (>1))

thats all im getting from that and it doesnt seem to make much sense or work is there somewhere in the guide that this process is explained?

In response to Treasurecat
When you look up something in the F1 help you use it just as you found it. If you look up:
walk_rand()
Then you would use it like that with the listed, necessary parameters.

When you look up >= you use it just like you found it:

if(1>=2)
world << "Uh oh..."

This will see if 1 is greater than or equal to two. You can also use <= in the same way.
In response to English
thanks