CLEO Help Any problem in this Script?

CLEO related
Status
Not open for further replies.

rottentwinkie

Moderator
Moderator
Joined
Apr 4, 2014
Messages
608
Reaction score
1
Code:
{$CLEO .CS}

thread 'NeverGetTired'

:NeverGetTired_01
wait 0
if
0AB0:   key_pressed 121
else_jump @NeverGetTired_01
0330: set_player never gets tired 1
jump @NeverGetTired_01

:NeverGetTired_02
wait 0
if
0AB0: key_pressed 120
else_jump @NeverGetTired_02
0330: set_player never gets tired 0
jump @NeverGetTired_02

Please tell me if there are is any problem with this script.  :computer_guy:
Cause im still noob at Cleo Scripting.  :computer_guy:
 

not490

Well-known member
Joined
Feb 8, 2014
Messages
438
Reaction score
4
Code:
jump @NeverGetTired_01

:NeverGetTired_02
wait 0
if
0AB0: key_pressed 120

jump @NeverGetTired_01 Put there    @NeverGetTired_02


AND here


Code:
:NeverGetTired_02
wait 0
if
0AB0: key_pressed 120
else_jump @NeverGetTired_02
0330: set_player never gets tired 0
jump @NeverGetTired_02
  0330: set_player never gets tired 0
jump @NeverGetTired_01
 

rottentwinkie

Moderator
Moderator
Joined
Apr 4, 2014
Messages
608
Reaction score
1
Code:
{$CLEO .CS}

thread 'NEVERGETTIRED'

:NEVERGETTIRED_01
wait 0
if
0AB0:   key_pressed 121
else_jump @NEVERGETTIRED_01
0330: set_player never gets tired 1
jump @NEVERGETTIRED_02

:NEVERGETTIRED_02
wait 0
if
0AB0: key_pressed 120
else_jump @NEVERGETTIRED_02
0330: set_player never gets tired 0
jump @NEVERGETTIRED_01

BTW, i cant compile my cleo script, reason "Not enough actual paramaters, except 2 params."
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Code:
:A
wait 0
if
0AB0:   key_pressed 121
else_jump @A
0330: set_player $PLAYER_CHAR infinite_run 1
print "~G~ON" 2000
wait 750
jump @B

:B
wait 0
if
0AB0: key_pressed 120
else_jump @B
print "~R~OFF" 2000
0330: set_player $PLAYER_CHAR infinite_run 0
jump @A
 

TheZeRots

Expert
Joined
Dec 21, 2013
Messages
1,247
Reaction score
1
Yeah, simply change "never gets tired" to "infinite_run".
Because "never gets tired" is not a valid parameter.

[glow=green,2,300]Instead of[/glow]
Code:
0330: set_player never gets tired
[glow=green,2,300]use[/glow]
Code:
0330: set_player $PLAYER_CHAR infinite_run 1

Code:
{$CLEO .CS}

thread 'NEVERGETTIRED'

:NEVERGETTIRED_01
wait 0
if
0AB0:   key_pressed 121
else_jump @NEVERGETTIRED_01
0330: set_player $PLAYER_CHAR infinite_run 1
jump @NEVERGETTIRED_02

:NEVERGETTIRED_02
wait 0
if
0AB0: key_pressed 120
else_jump @NEVERGETTIRED_02
0330: set_player $PLAYER_CHAR infinite_run 0
jump @NEVERGETTIRED_01

Flamez link said:
Well, i got this when press F6 to compile. http://prntscr.com/3om4qb

That means your script compiled [glow=green,2,300]SUCCESSFULLY![/glow]
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Mr.Ze link said:
Yeah, simply change "never gets tired" to "infinite_run".
Because "never gets tired" is not a valid parameter.

[glow=green,2,300]Instead of[/glow]
Code:
0330: set_player never gets tired
[glow=green,2,300]use[/glow]
Code:
0330: set_player $PLAYER_CHAR infinite_run 1

Code:
{$CLEO .CS}

thread 'NEVERGETTIRED'

:NEVERGETTIRED_01
wait 0
if
0AB0:   key_pressed 121
else_jump @NEVERGETTIRED_01
0330: set_player $PLAYER_CHAR infinite_run 1
jump @NEVERGETTIRED_02

:NEVERGETTIRED_02
wait 0
if
0AB0: key_pressed 120
else_jump @NEVERGETTIRED_02
0330: set_player $PLAYER_CHAR infinite_run 0
jump @NEVERGETTIRED_01

[quote author=Flamez link=topic=7547.msg42777#msg42777 date=1401624359]
Well, i got this when press F6 to compile. http://prntscr.com/3om4qb

That means your script compiled [glow=green,2,300]SUCCESSFULLY![/glow]
[/quote]

Actually it doesn't matter, opcodes can be used without the text, like 0330: $player_char 1, these are the only 2 parameters needed, actor handle(specify which player will get this attribute) and bool(1/0, on/off).
 

TheZeRots

Expert
Joined
Dec 21, 2013
Messages
1,247
Reaction score
1
springfield link said:
[quote author=Mr.Ze link=topic=7547.msg42778#msg42778 date=1401624476]
Yeah, simply change "never gets tired" to "infinite_run".
Because "never gets tired" is not a valid parameter.

[glow=green,2,300]Instead of[/glow]
Code:
0330: set_player never gets tired
[glow=green,2,300]use[/glow]
Code:
0330: set_player $PLAYER_CHAR infinite_run 1

Code:
{$CLEO .CS}

thread 'NEVERGETTIRED'

:NEVERGETTIRED_01
wait 0
if
0AB0:   key_pressed 121
else_jump @NEVERGETTIRED_01
0330: set_player $PLAYER_CHAR infinite_run 1
jump @NEVERGETTIRED_02

:NEVERGETTIRED_02
wait 0
if
0AB0: key_pressed 120
else_jump @NEVERGETTIRED_02
0330: set_player $PLAYER_CHAR infinite_run 0
jump @NEVERGETTIRED_01

[quote author=Flamez link=topic=7547.msg42777#msg42777 date=1401624359]
Well, i got this when press F6 to compile. http://prntscr.com/3om4qb

That means your script compiled [glow=green,2,300]SUCCESSFULLY![/glow]
[/quote]

Actually it doesn't matter, opcodes can be used without the text, like 0330: $player_char 1, these are the only 2 parameters needed, actor handle(specify which player will get this attribute) and bool(1/0, on/off).
[/quote]
Actually, yes, correct, however, he was missing "$PLAYER_CHAR" from the script. And I always use and prefer the exact opcode text... makes things clearer.
 
Status
Not open for further replies.
Top