CLEO Help ELSE IF

CLEO related
Status
Not open for further replies.

i0sa

Member
Joined
Feb 24, 2014
Messages
5
Reaction score
0
Hi,
im trying to edit and improve some CS file, im not experienced at all but heres it

Code:
:BLAH_104
wait 0
0AB0:   key_pressed 1@           
else_jump @BLAH_104
jump @BLAH_127


:BLAH_127

The above code checks if key "1@" is pressed, if yes it jumps to BLAH_127

i want if key_pressed 1@ jump to BLAH_127
else if key_pressed 2@ jump to BLAH_128

here's my attempt that doesnt work  :bawww:

Code:
:BLAH_104
wait 0
0AB0:   key_pressed 1@           
else_jump @BLAH_104
jump @BLAH_127

0AB0:   key_pressed 2@           
else_jump @BLAH_104
jump @BLAH_128

:BLAH_127
etc
:BLAH_128
etc
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Code:
WHILE TRUE
wait 0
if 0AB0: key_pressed 1@
then jump @blah_127
end
if 0AB0: key_pressed 2@
then jump @blah_128
end
END
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
ye. or

Code:
:BLAH_104
wait 0
if
	0AB0:   key_pressed 1@           
then
	jump @BLAH_127
else
	if
		0AB0:   key_pressed 2@
	then
		jump @BLAH_128
	else
		jump @BLAH_104
	end
end
 

i0sa

Member
Joined
Feb 24, 2014
Messages
5
Reaction score
0
Thanks, Here's one more question off-topic regarding variables
I have this

Code:
:BLAH_150
wait 0 
0AB0:   key_pressed 1@ 
else_jump @BLAH_210 
@variable = "STRING" // fix this line

I want to make a variable in there

and i want to use this variable in this line

Code:
0AF0: 12@ = get_int_from_ini_file "CLEO\CONFIG.INI" section @variable key "xx"

thanks
 
Status
Not open for further replies.
Top