CLEO Help Car health

CLEO related
Status
Not open for further replies.

renko

Active member
Joined
Jul 8, 2014
Messages
58
Reaction score
0
When i try to compile this mod i get an error:
Code:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'HEALTH_CAR' 

:HEALTH_BAR_19
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @HEALTH_BAR_19 
if 
  $ONMISSION == 0 
else_jump @HEALTH_BAR_19 
if 
84A7:   not actor $PLAYER_ACTOR driving_boat 
04C8:   actor $PLAYER_ACTOR driving_flying_vehicle 
   Actor.Driving($PLAYER_ACTOR)
else_jump @HEALTH_BAR_19 
0811: 0@ = actor $PLAYER_ACTOR used_car 
Car.Health(0@) = 1000

:HEALTH_BAR_99
$Y_ROYAL_CASINO = Car.Health(0@)
$Y_ROYAL_CASINO /= 10 
03C4: set_status_text $CAR_PLAYER type 1 GXT 'SWE4_08' // global_variable  // CAR HEALTH
0084: $CAR_PLAYER = $Y_ROYAL_CASINO // (int) 
wait 0 
if 
   Actor.InCar($PLAYER_ACTOR, 0@)
else_jump @HEALTH_BAR_281 
jump @HEALTH_BAR_99 
wait 0 
if 
   not Car.Wrecked(0@)
else_jump @HEALTH_BAR_195 
jump @HEALTH_BAR_99 

:HEALTH_BAR_195
0151: remove_status_text $CAR_PLAYER 
Car.StorePos(0@, 1@, 2@, 3@)
020B: explode_car 0@ 
020C: create_explosion_with_radius 0 at 1@ 2@ 3@ 
020C: create_explosion_with_radius 0 at 1@ 2@ 3@ 
02CF: 4@ = create_fire_at 1@ 2@ 3@ propagation 0 size 1 
02CF: 5@ = create_fire_at 1@ 2@ 3@ propagation 0 size 1 

:HEALTH_BAR_281
0151: remove_status_text $CAR_PLAYER 
jump @HEALTH_BAR_19 
0A93: end_custom_thread
Error: Incorrect number of the conditions.
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
The problem is in the label "HEALTH_BAR_19"

:HEALTH_BAR_19
wait 0
if
  Player.Defined($PLAYER_CHAR)
else_jump @HEALTH_BAR_19
if
  $ONMISSION == 0
else_jump @HEALTH_BAR_19
if // if there are more than 1 condition use IF AND
84A7:  not actor $PLAYER_ACTOR driving_boat
04C8:  actor $PLAYER_ACTOR driving_flying_vehicle
  Actor.Driving($PLAYER_ACTOR)
else_jump @HEALTH_BAR_19
0811: 0@ = actor $PLAYER_ACTOR used_car
Car.Health(0@) = 1000
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
if and
84A7:  not actor $PLAYER_ACTOR driving_boat
04C8:  actor $PLAYER_ACTOR driving_flying_vehicle
else_jump @HEALTH_BAR_19
 
Status
Not open for further replies.
Top