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

Happy Holidays from the GTANet team!

Gta sa crash while loading a save file


Ig0r98
 Share

Recommended Posts

Hello, i have a problem with loading a save file. So i've been creating this myth mod for gta sa and i want it to have progress. Basically after killing each monster you would save the game and load it next time that you are playing. I created my own save point and here is the code: 

:SAVE1
script_name 'SAVE1' 
wait 1000 
save_this_custom_script 
[email protected] = 1194.91 
[email protected] = -832.1778 
[email protected] = 1103.636 
[email protected] = 1191.801 
[email protected] = -832.22 
[email protected] = 1103.636 
[email protected] = 1103.636 
Pickup.Create([email protected], 1277, 3, [email protected], 2@, [email protected])
0570: [email protected] = create_asset_radar_marker_with_icon 35 at [email protected] [email protected] [email protected] 
018B: set_marker [email protected] radar_mode 2 

:SAVE1_130
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
jf @SAVE1_245 
if 
   Pickup.Picked_up([email protected])
jf @SAVE1_245 
if 
  $ONMISSION == 0 
jf @SAVE1_186 
03D8: show_save_screen 

:SAVE1_186
wait 0 
Actor.PutAt($PLAYER_ACTOR, [email protected], [email protected], [email protected])
Actor.Angle($PLAYER_ACTOR) = [email protected]
Player.CanMove($PLAYER_CHAR, True)
wait 1000 
Pickup.Create([email protected], 1277, 3, [email protected], [email protected], [email protected])
090D: highlight_all_inactive_gang_zones_as_available_for_gangwars 

:SAVE1_245
jump @SAVE1_130

 

 

And everything's working great except for loading that file. The game just crashes. I also have fastman92 limit adjuster so it gave me a log. Here is the log: 

Game crashed unfortunately, here's a crash log:
Current process ID: 8388
Current thread ID: 11976
Last file to be loaded: Free ID list generator.cs
Last library loaded: NOT SET
Exception address: 0x005D532A ("GTA_SA.EXE"+0x1D532A)
Exception code: 0xC0000005
Exception name: EXCEPTION_ACCESS_VIOLATION
Inaccessible memory address: 0x0

General registers:
EAX: 0x00000000 (0)
EBX: 0x00000000 (0)
ECX: 0x00000000 (0)
EDX: 0x159AC5E8 (362464744)
ESI: 0x00000000 (0)
EDI: 0x00000000 (0)
EBP: 0x0000000A (10)
ESP: 0x0177FACC (24640204)
EIP: 0x005D532A (6116138)
EFL: 0x00210246 (2163270)

Segment registers:
CS: 0023
DS: 002B
ES: 002B
FS: 0053
GS: 002B
SS: 002B

FPU registers:
ST0: 3124998.000000 bytes: 00 00 00 00 00 18 BC BE 14 40
ST1: 1.000000 bytes: 00 00 00 00 00 00 00 80 FF 3F
ST2: -1562500.000000 bytes: 00 00 00 00 00 20 BC BE 13 C0
ST3: 1.000000 bytes: 00 00 00 00 00 00 00 80 FF 3F
ST4: -1562499.000000 bytes: 00 00 00 00 00 18 BC BE 13 C0
ST5: 63.000000 bytes: 00 00 00 00 00 00 00 FC 04 40
ST6: 63.000000 bytes: 00 00 00 00 00 00 00 FC 04 40
ST7: 1440.000000 bytes: 00 00 00 00 00 00 00 B4 09 40
CTRL: 007F
STAT: 0122
TAGS: FFFF

MMX registers, 8 bytes:
MM0: 00 00 00 00 00 18 BC BE
MM1: 00 00 00 00 00 00 00 80
MM2: 00 00 00 00 00 20 BC BE
MM3: 00 00 00 00 00 00 00 80
MM4: 00 00 00 00 00 18 BC BE
MM5: 00 00 00 00 00 00 00 FC
MM6: 00 00 00 00 00 00 00 FC
MM7: 00 00 00 00 00 00 00 B4

XMM registers, 16 bytes:
XMM0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
XMM1: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
XMM2: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
XMM3: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
XMM4: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
XMM5: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
XMM6: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
XMM7: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

 

Also worth to mention I am coding on main.scm that has no missions on it. So the monsters are counting as missions and defeating them also gives you progress ingame. If anyone know why is this happening and if there is a fix please let me know.

Link to comment
Share on other sites

2 hours ago, Ig0r98 said:

BTThe game just crashes.

Add a is player defined/playing check before trying to move the actor. This is a likely source of a crash when loading.

 

Saving the custom script isn't necessary for scripts in a main.scm. Local variables and instruction pointers are maintained in the save. I doubt thread saving will crash anything, but best to avoid possible conflicts.

 

Your respawn angle is borked.

 

You can use model IDs instead of model numbers in SCM.

Link to comment
Share on other sites

Can you please explain "is player defined/playing check" I don't seem to quite understand that. Can you please write that code here. Also I can delete save_this_custom_script and change the angle. But in-game after player walks in to the save point normally everything's working fine the save screen pop out and after saving script moves player a bit forward of save point so the player don't get stuck in infinitive Save srceen. 

Link to comment
Share on other sites

Your script was made for Cleo, therefore this code: save_this_custom_script 

For using in main.scm you must remove it

Also, we can see in your crash log that cleo scripts are running and these can cause problems

 

Basicly, if you wanna find out reason of problem, then test it on unmodded game

That means, take an unmodded GTA SA installation,

of course do you need your favourite gta_sa.exe

furthermore asi loader and silent patch

but nothing else

 

Run your modded main.scm and script.img and test it.

 

I assume that you need modloader because of the monsters

Don't do that, use instead existing model names of original game

First make sure that your script works fine.

Then expand it and other files to realize your plans

 

 

Link to comment
Share on other sites

Hello, i've deleted the code save_this_custom_script and that just makes things worst. So the game crashes upon starting new game. Which didnt happend before. I also tryed removeing some cleo script that may be the problem but no success. I also dont use modloader all my scripts for monsters and so on are in main.scm and models and txd are in my custom .img that i created. I also installed clean vesrion of gta and i've just copyed the save script and it works fine. 

Link to comment
Share on other sites

so next step, integrate the custom.img into the clean version of gta and nothing else and without cleo and test the main.scm with the monster mission and save and load savegame

Link to comment
Share on other sites

Alright, so now i moved my custom.img to clean gta and just take bigfoot script from my main moded gta and compiled it to cleo and put it in clean version, after defeating myth and saving it works on that clean version. I think this has something to do with no missions on that main main.scm im working on.

Link to comment
Share on other sites

16 hours ago, Ig0r98 said:

Can you please explain "is player defined/playing check"

This stuff included earlier in your script:  Player.Defined($PLAYER_CHAR). Basic rule is to always include a player check before using opcodes that manipulate the player. When you load a save, your script will try to resume after the wait following the save screen. The previous player check won't be valid when loading, and loading is one of those times when the player is least likely to be defined.

 

You should include a save done check and wait loop after the save screen. Check the standard PSAVE script for examples. The save process needs to park running scripts on a wait statement. You don't want your script to move on to the next wait. Then wait for the player to be defined before trying to move him.

 

Be aware that almost anything you change in main.scm at this stage will make previous saves incompatible. I've never trusted cleo saves; they can confound test results.

Edited by OrionSR
Link to comment
Share on other sites

Hi guys btw i found what was the problem. It was problem in on of my monster script. I fixed it and now everythings working great. Thank you for your help also.

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.