Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

proofread my cleo


HeresOtis
 Share

Recommended Posts

Everytime I press the key to start this it crashes. Whats wrong?

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread "FIREBAK" 0000: NOP Model.Load(#FIRELA)Model.Load(#FIRETRUK)Model.Load(#LAFD1)Model.Load(#FIRE_EX):FIREBAK_33wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @FIREBAK_33 wait 0 if 0AB0:   key_pressed 97 else_jump @FIREBAK_33 jump @FIREBAK_79 :FIREBAK_79wait 0 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 -10.0 0.0 $PLAYERCAR = Actor.Car($PLAYER_ACTOR)0209: [email protected] = random_int_in_ranges 0 4 0871: init_jump_table [email protected] total_jumps 4 default_jump 0 @FIREBAK_192 jumps 0 @FIREBAK_199 1 @FIREBAK_226 2 @FIREBAK_253 3 @FIREBAK_280 -1 @FIREBAK_192 -1 @FIREBAK_192 -1 @FIREBAK_192 :FIREBAK_192jump @FIREBAK_307 :[email protected] += 50.0 [email protected] += 50.0 jump @FIREBAK_307 :[email protected] -= 50.0 [email protected] += 50.0 jump @FIREBAK_307 :[email protected] -= 50.0 [email protected] -= 50.0 jump @FIREBAK_307 :[email protected] += 50.0 [email protected] -= 50.0 jump @FIREBAK_307 :FIREBAK_307Model.Load(#FIRETRUK):FIREBAK_312wait 0 if   Model.Available(#FIRETRUK)else_jump @FIREBAK_312 02C1: store_to [email protected] [email protected] [email protected] car_path_coords_closest_to [email protected] [email protected] [email protected] [email protected] = Car.Create(#FIRETRUK, [email protected], [email protected], [email protected])0129: $FIRE_DRIVER = create_actor_pedtype 18 model #LAFD1 in_car [email protected] driverseat 01C8: $FIRE_DRIVER_P = create_actor_pedtype 18 model #LAFD1 in_car [email protected] passenger_seat -1 01B2: give_actor $FIRE_DRIVER weapon 42 ammo 99999 // Load the weapon model before using this 01B2: give_actor $FIRE_DRIVER_P weapon 42 ammo 99999 // Load the weapon model before using this 055D: make_player $FIRE_DRIVER fireproof 1 055D: make_player $FIRE_DRIVER_P fireproof 1 07AF: $PLAYER_GROUP = player $PLAYER_ACTOR group 0631: put_actor $FIRE_DRIVER in_group $PLAYER_GROUP 0631: put_actor $FIRE_DRIVER_P in_group $PLAYER_GROUP 0397: enable_car [email protected] siren 1 07F8: car [email protected] follow_car $PLAYERCAR radius 13.5 [email protected] = Marker.CreateAboveCar([email protected])Marker.SetColor([email protected], 1)Car.SetMaxSpeed([email protected], 40.0)0423: set_car [email protected] improved_handling_to 2.0 // (float) 00AE: set_car [email protected] traffic_behaviour_to 3 067F: set_car [email protected] lights 2 jump @FIREBAK_535 :FIREBAK_535wait 0 if   Actor.Driving($PLAYER_ACTOR)else_jump @FIREBAK_562 jump @FIREBAK_630 :FIREBAK_562wait 1000 0633: AS_actor $FIRE_DRIVER exit_car [email protected] = Marker.CreateAboveActor($FIRE_DRIVER)Marker.SetColor([email protected], 1)0633: AS_actor $FIRE_DRIVER_P exit_car [email protected] = Marker.CreateAboveActor($FIRE_DRIVER_P)Marker.SetColor([email protected], 1)0850: AS_actor $FIRE_DRIVER follow_actor $PLAYER_ACTOR 0850: AS_actor $FIRE_DRIVER_P follow_actor $PLAYER_ACTOR jump @FIREBAK_692 :FIREBAK_630wait 0 if 0973:   fire -1 exists else_jump @FIREBAK_535 wait 0 06F5: create_coordinate [email protected] [email protected] [email protected] from_fire -1 wait 600 Car.DriveTo([email protected], [email protected], [email protected], [email protected])jump @FIREBAK_773 :FIREBAK_692wait 0 if 0973:   fire -1 exists else_jump @FIREBAK_535 wait 0 06F5: create_coordinate [email protected] [email protected] [email protected] from_fire -1 wait 0 if 01AE:   car $PLAYERCAR sphere 0 near_point [email protected] [email protected] radius 10.0 10.0 stopped else_jump @FIREBAK_692 jump @FIREBAK_773 :FIREBAK_773wait 500 0633: AS_actor $FIRE_DRIVER exit_car [email protected] = Marker.CreateAboveActor($FIRE_DRIVER)Marker.SetColor([email protected], 1)0633: AS_actor $FIRE_DRIVER_P exit_car [email protected] = Marker.CreateAboveActor($FIRE_DRIVER_P)Marker.SetColor([email protected], 1)wait 200 02D6:   actor $FIRE_DRIVER fires_weapon 42 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] 02D6:   actor $FIRE_DRIVER_P fires_weapon 42 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] jump @FIREBAK_868 :FIREBAK_868wait 0 if 02D0:   fire -1 extinguished else_jump @FIREBAK_868 wait 2000 0850: AS_actor $FIRE_DRIVER follow_actor $PLAYER_ACTOR 0850: AS_actor $FIRE_DRIVER_P follow_actor $PLAYER_ACTOR jump @FIREBAK_915 :FIREBAK_915wait 0 if   Actor.Dead($FIRE_DRIVER)else_jump @FIREBAK_535 wait 500 06C9: remove_actor $FIRE_DRIVER from_group Actor.RemoveReferences($FIRE_DRIVER)Marker.Disable([email protected])jump @FIREBAK_962 :FIREBAK_962wait 0 if   Actor.Dead($FIRE_DRIVER_P)else_jump @FIREBAK_535 wait 500 06C9: remove_actor $FIRE_DRIVER_P from_group Actor.RemoveReferences($FIRE_DRIVER_P)Marker.Disable([email protected])jump @FIREBAK_1009 :FIREBAK_1009if and  Actor.Dead($FIRE_DRIVER)  Actor.Dead($FIRE_DRIVER_P)else_jump @FIREBAK_535 0632: release_group $PLAYER_GROUP jump @FIREBAK_1042 :FIREBAK_1042if Car.Destroy([email protected])else_jump @FIREBAK_535 wait 5000 jump @FIREBAK_33 

 

Link to comment
Share on other sites

I stopped reading the script as soon as I saw that you were using your own global variable. You are asking for trouble when you make up your own global names.

Link to comment
Share on other sites

$PLAYERCAR, $FIRE_DRIVER, $FIRE_DRIVER_P, etc. must be changed to local variables.

23088_s.gif

Link to comment
Share on other sites

I changed them all and the game still crashes when I press the key.

I'm trying to make it where it spawns a firetruck with 2 firefighters in it with the fire extinguisher as a weapon and the car and peds follow me.

Link to comment
Share on other sites

These could be a problem:

 

055D: make_player $FIRE_DRIVER fireproof 1055D: make_player $FIRE_DRIVER_P fireproof 1

 

They might only be applicable to the player. Try 02AB instead.

23088_s.gif

Link to comment
Share on other sites

Crash: 07AF should use $PLAYER_CHAR not $PLAYER_ACTOR

 

//07AF: $PLAYER_GROUP = player $PLAYER_ACTOR group 07AF: [email protected] = player $PLAYER_CHAR group

 

 

This line is causing a crash. Edit: works when all undefined global variables were swapped out for local variables.

 

//07F8: car [email protected] follow_car $PLAYERCAR radius 13.507F8: car [email protected] follow_car [email protected] radius 13.5

 

 

It would be a good idea to load all models used and to check to make sure they are loaded.

 

:FIREBAK_307Model.Load(#FIRETRUK)Model.Load(#LAFD1)Model.Load(#FIRE_EX):FIREBAK_312wait 0if and Model.Available(#FIRETRUK) Model.Available(#LAFD1) Model.Load(#FIRE_EX)  

 

 

These lines did not cause a crash but they did not make the firefighters fireproof. Use the opcode suggested by Adler.

 

//055D: make_player $FIRE_DRIVER fireproof 1//055D: make_player $FIRE_DRIVER_P fireproof 1055D: make_player [email protected] fireproof 1055D: make_player [email protected] fireproof 1

 

Edited by OrionSR
Link to comment
Share on other sites

spaceeinstein

^$PLAYER_CHAR

Link to comment
Share on other sites

I think the global names get truncated at some point because $PLAYER_CHARACTER was working just fine, but yeah: $PLAYER_CHAR would provide better consistency. I'll edit my post accordingly.

 

There are several versions of the opcode that records an actor's car. It would be best to use the opcode version just to be sure of what gets compiled. I'm not sure what the difference is.

 

 

//$PLAYERCAR = Actor.Car($PLAYER_ACTOR)//00D9: [email protected] = actor $PLAYER_ACTOR car // mission only 03C0: [email protected] = actor $PLAYER_ACTOR car //0811: [email protected] = actor $PLAYER_ACTOR car // versionC 

 

 

When I was lazy and didn't change out all the undefined global variables for local variables I had unusual crashes. The general rule for using global variables is to only use $PLAYER_ACTOR, $PLAYER_CHAR, and $ONMISSION in your CLEO scripts.

 

Local variables [email protected] and [email protected] are local timers. Their values constantly change. This is not the correct way to use them.

 

//06F5: create_coordinate [email protected] [email protected] [email protected] from_fire -1 06F5: create_coordinate [email protected] [email protected] [email protected] from_fire -1

 

Edited by OrionSR
Link to comment
Share on other sites

spaceeinstein

03C0 works generally. Apparently Actor.Car uses 00D9. The others are specific to certain situations.

00D9, 0811

 

If you want to keep track of variables without using global variables, you can use

 

constPLAYER_CAR = [email protected]: PLAYER_CAR = actor $PLAYER_ACTOR car0229: set_car PLAYER_CAR primary_color_to 0 secondary_color_to 0

 

Edited by spaceeinstein
Link to comment
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
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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