Jump to content

Cleo Error


ThePlague1988

Recommended Posts

ThePlague1988

What is wrong with my script... ?

 

 

{$CLEO .cs}:Vehicleflip_1thread 'FLIPVEHICLE':Vehicleflip_2wait 003C0: 1@ = actor $PLAYER_ACTOR carif and   Player.Defined($PLAYER_CHAR)   Actor.Driving($PLAYER_ACTOR)01F4: car 1@ flipped    else_jump @Vehicleflip_208A6: set_car 1@ componentA 0 rotation_to 0.0jump @Vehicleflip_2

 

 

Please help me, thanks!

Link to comment
https://gtaforums.com/topic/462852-cleo-error/
Share on other sites

Before getting pointer to actor's car, you should check if actor is driving.

Also use max 7 chars in thread name.

 

That should work OK (kept low-level style):

 

 

{$CLEO}thread 'FLIP':FLIPwait 0if   0256:   player 0 defined else_jump @FLIPif   00DF:   actor $PLAYER_ACTOR driving else_jump @FLIP0811: 0@ = actor $PLAYER_ACTOR car_nosave // Better than 03C0, in this caseif   01F4:   car 0@ flipped else_jump @FLIP08A6: set_car 0@ componentA 0 rotation_to 0.0jump @FLIP

 

Link to comment
https://gtaforums.com/topic/462852-cleo-error/#findComment-1060198628
Share on other sites

ThePlague1988

This doesn't flip the car back over, when it's flipped why?

 

 

{$CLEO}thread 'FLIP':Vehicleflip_1wait 0if  0256:   player 0 definedelse_jump @Vehicleflip_1if  Actor.Driving($PLAYER_ACTOR)else_jump @Vehicleflip_103C0: 0@ = actor $PLAYER_ACTOR carif  01F4:   car 0@ flippedelse_jump @Vehicleflip_108A6: set_car 0@ componentA 0 rotation_to 0.0jump @Vehicleflip_1

 

Link to comment
https://gtaforums.com/topic/462852-cleo-error/#findComment-1060198893
Share on other sites

ThePlague1988

This used to work but, it quit working whats wrong with it...

 

 

{$CLEO}thread 'FLIP':FLIPwait 0ifPlayer.Defined($PLAYER_CHAR)else_jump @FLIPifActor.Driving($PLAYER_CHAR)else_jump @FLIP03C0:   0@ = actor $PLAYER_ACTOR carif and01F4:   car 0@ flipped01C1:   car 0@ stopped else_jump @FLIPCar.StorePos(0@, 1@, 2@, 3@)3@ += 24@ = Car.Angle(0@)Car.PutAt(0@, 1@, 2@, 3@)Car.Angle(0@) = 4@wait 2000jump @FLIP 

 

 

Can't figured it out, need your ungodly help guys.

Thanks in advance

Link to comment
https://gtaforums.com/topic/462852-cleo-error/#findComment-1060199012
Share on other sites

Why did you change this

 

Actor.Driving($PLAYER_ACTOR)

 

to this?

 

Actor.Driving($PLAYER_CHAR)

 

 

This

 

ifPlayer.Defined($PLAYER_CHAR)else_jump @FLIPifActor.Driving($PLAYER_ACTOR) // Fixedelse_jump @FLIP

 

Can be combined into

 

if and   Player.Defined($PLAYER_CHAR)   Actor.Driving($PLAYER_ACTOR)jf @FLIP

 

or you could leave out the Player.Defined check because if the actor is driving then $PLAYER_CHAR should already be defined.

Link to comment
https://gtaforums.com/topic/462852-cleo-error/#findComment-1060199047
Share on other sites

 

Car.StorePos(0@, 1@, 2@, 3@)3@ += 2

 

Position are float, not integers.

 

Also I've told you that 0811 is better here than 03C0.

 

 

{$CLEO}thread "FLIP":FLIPwait 0if   0256:   player 0 defined else_jump @FLIPif   00DF:   actor $PLAYER_ACTOR driving else_jump @FLIP0811: 0@ = actor $PLAYER_ACTOR car_nosaveif and   01F4:   car 0@ flipped   01C1:   car 0@ stopped else_jump @FLIP0731: set_car 0@ y_angle_to 0.0 wait 2000jump @FLIP

 

That should work OK.

 

@Adler

I'm always leaving 0256 conditional in separate check smile.gif

Link to comment
https://gtaforums.com/topic/462852-cleo-error/#findComment-1060199220
Share on other sites

 

@Adler

I'm always leaving 0256 conditional in separate check smile.gif

Heh I leave it out sometimes when I'm too lazy to put it in and it works fine. Whatever floats your boat I guess. smile.gif

 

 

Also I've told you that 0811 is better here than 03C0.

Btw what's the difference between those opcodes? Sorry for not paying attention to the latest coding news lol.

Link to comment
https://gtaforums.com/topic/462852-cleo-error/#findComment-1060199603
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.