Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      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

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

Again what's wrong with this gta3 pic.


crashoverride93
 Share

Recommended Posts

crashoverride93

 

 

 

 

Again this is a new script for GTA3 but the game crashes

 

 

{$CLEO .cs}

thread 'ACTORH'

:ACTORH_00

wait 100

if

0256: player $PLAYER_CHAR defined

else_jump @ACTORH_00

:ACTORH_01

wait 1000

0247: request_model #FEMALE01

0247: request_model #SHOTGUN

if and

0248: model #FEMALE01 available

0248: model #SHOTGUN available

else_jump @ACTORH_01

038B: load_requested_models

0054: store_player $PLAYER_CHAR position_to [email protected] [email protected] [email protected]

[email protected] += 1.75 // floating-point values

[email protected] += 3.0 // floating-point values

009A: [email protected] = create_actor_pedtype 43 model #FEMALE01 at [email protected] [email protected] [email protected]

01DE: tie_actor [email protected] to_actor $PLAYER_ACTOR

02E2: set_actor [email protected] weapon_accuracy_to 100

:ACTORH_02

wait 1000

0054: store_player $PLAYER_CHAR position_to [email protected] [email protected] [email protected]

[email protected] += 1.75 // floating-point values

[email protected] += 3.0 // floating-point values

if

0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 15.0 find_next 1 pass_deads 1 //IF and SET

else_jump @ACTORH_02

:ACTORH_03

wait 1000

01B2: give_actor [email protected] weapon 4 ammo 400

0223: set_actor [email protected] health_to 999

035F: set_actor [email protected] armour_to 999

01CB: actor [email protected] kill_actor [email protected]

:ACTORH_04

wait 15000

if

0118: actor [email protected] dead

else_jump @ACTORH_04

0249: release_model [email protected]

jump @ACTORH_03

Link to comment
Share on other sites

How to solve crash problems:

 

What i do everytime i experiment crashes is testing my code in isolated parts.

Comment all code you can leaving only the minimum possible to run. Your game should stop crashing after that, if not, you are making a mistake in that minimum code you left uncommented.

 

After reaching that point your game stops crashing, you must uncomment step by step until your game begins crashing again. Then you'll have found the problem. Or in order to advance more quickly, just uncoment half of the code, if your game stops crashing, error is in commented part. If not, probably commented part is clean, but you have to make sure of that uncommenting that part and commenting the zone that makes your game crash. After that, all you have to do is reduce the area of test until is so small that the problem becomes obvious....

 

 

 

Another thing is: write code in high level instead of low.

Low level code is difficult to read, and what is difficult to read is difficult to debug...

 

An example:

 

This is more easy to read:

while true    wait 1000    01B2: give_actor [email protected] weapon 4 ammo 400    0223: set_actor [email protected] health_to 999    035F: set_actor [email protected] armour_to 999    01CB: actor [email protected] kill_actor [email protected]    repeat    wait 15000    until 0118: actor [email protected] dead    0249: release_model [email protected]

than this

:ACTORH_03wait 100001B2: give_actor [email protected] weapon 4 ammo 4000223: set_actor [email protected] health_to 999035F: set_actor [email protected] armour_to 99901CB: actor [email protected] kill_actor [email protected]:ACTORH_04wait 15000if0118: actor [email protected] deadelse_jump @ACTORH_040249: release_model [email protected] @ACTORH_03 

And is exactly the same code.

 

 

Want another example? You tell me what is more readable:

if0039:   [email protected] == 0else_jump @CODE_9050006: [email protected] = 1jump @CODE_1077:CODE_9050006: [email protected] = 0:CODE_1077// More code
if 0039:   [email protected] == 0then 0006: [email protected] = 1else 0006: [email protected] = 0end// More code

Read more about high level coding here. Or just watch Sanny Builder Help section.

 

 

 

 

 

About your code:

I don't think this is causing the crashes, but why using so long waits?

:ACTORH_00wait 100if0256: player $PLAYER_CHAR definedelse_jump @ACTORH_00 

why wait 100? wait 0 should work just fine.

:ACTORH_01wait 10000247: request_model #FEMALE010247: request_model #SHOTGUNif and0248: model #FEMALE01 available0248: model #SHOTGUN availableelse_jump @ACTORH_01 038B: load_requested_models

Why wait 1000?

Also, you should do the request instruction before the loop, just like this:

0247: request_model #FEMALE010247: request_model #SHOTGUN038B: load_requested_models:ACTORH_01wait 0if and0248: model #FEMALE01 available0248: model #SHOTGUN availableelse_jump @ACTORH_01 

And should work. Also, notice that you put instruction 038B: load_requested_models after loop, but it should go before requests.

:ACTORH_04wait 15000if0118: actor [email protected] deadelse_jump @ACTORH_04

Again, why wait 15 seconds?!

 

 

 

Well, hope this helps....

Edited by Sloth-
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.