CLEO Help [HELP] Gosub statement

CLEO related
Status
Not open for further replies.

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
Can somebody explain to me "What is gosub ?" and How to use it in CLEO pls ? Can u give me an example ?

I tried to google but wikipedia sux my brain already.  :eek:key:
 

TheZeRots

Expert
Joined
Dec 21, 2013
Messages
1,247
Reaction score
1
:D
do something
gosub @P
jump @D

:p
do something
return

It will do something then it will go to P then it will return back to where gosub was and will follow what's next, and only next thing is jump to D, so it will loop.

gosub is generally a bit buggy with multiple loopsy loops.
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
Mr.Ze link said:
:D
do something
gosub @P
jump @D

:p
do something
return

It will do something then it will go to P then it will return back to where gosub was and will follow what's next, and only next thing is jump to D, so it will loop.

gosub is generally a bit buggy with multiple loopsy loops.
Just look at OPFuck.cs , and i've known clearcly about it :p , tks
Code:
:WHILE_F10
wait 0
0ACD: show_text_highpriority "FUCKING. ~R~PRESS [F10]~W~ AGAIN TO STOP." time 3500
04D5: create_corona_at 0@ 1@ 2@ radius 1.0 type 1 flare 0 RGB 255 0 0
if and
NOT KEY 121 // F10
Actor.InCar($PLAYER_ACTOR, 3@)
jf @TURN_OFF
0208: 10@ = random_float_in_ranges 0.0 360.0 
Car.Angle(3@) = 10@
Car.SetSpeedInstantly(3@, 90.0)
wait 0
GOSUB @HUPEN
0A30: repair_car 3@
Car.PutAt(3@, 0@, 1@, 2@) // PLACE CAR BACK TO THE FUCKUP PLACE. 
Actor.Health($PLAYER_ACTOR) = 100
jump @WHILE_F10



:HUPEN
11@ = 12006488 
11@ += 36 // HUPEN 
0A8C: write_memory 11@ size 1 value 255 virtual_protect 0
return
 

TheZeRots

Expert
Joined
Dec 21, 2013
Messages
1,247
Reaction score
1
D.Kay link said:
Just look at OPFuck.cs , and i've known clearcly about it :p , tks
Code:
:WHILE_F10
wait 0
0ACD: show_text_highpriority "FUCKING. ~R~PRESS [F10]~W~ AGAIN TO STOP." time 3500
04D5: create_corona_at 0@ 1@ 2@ radius 1.0 type 1 flare 0 RGB 255 0 0
if and
NOT KEY 121 // F10
Actor.InCar($PLAYER_ACTOR, 3@)
jf @TURN_OFF
0208: 10@ = random_float_in_ranges 0.0 360.0 
Car.Angle(3@) = 10@
Car.SetSpeedInstantly(3@, 90.0)
wait 0
GOSUB @HUPEN
0A30: repair_car 3@
Car.PutAt(3@, 0@, 1@, 2@) // PLACE CAR BACK TO THE FUCKUP PLACE. 
Actor.Health($PLAYER_ACTOR) = 100
jump @WHILE_F10



:HUPEN
11@ = 12006488 
11@ += 36 // HUPEN 
0A8C: write_memory 11@ size 1 value 255 virtual_protect 0
return
Just as I said. Hue  :me_gusta:
 
Status
Not open for further replies.
Top