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

Please Help With Code


MGM12188
 Share

Recommended Posts

Hey,

 

I have a problem with my code, as I start a New Game it crashes. As far as what happens, it loads but the cutscene at the airport doesn't show. So pretty much right after the loading screen I get a black screen, then nothing.

 

I believe that it is caused by the location of my code (Thread) in the .scm?

 

+ I only have a thread (no "mission"or "external script"), I used [create thread] and placed it on the bottom (last) from all the other "create thread's"

 

+ I then put the actual thread AFTER the "main"(thread) in the MAIN section (opposite of the MISSION section), which would be BEFORE "INT_1"

 

So could anybody double check if this would be the correct place to put a new (thread;only) in the .scm.

 

If this is a correct area then this is my script, but I don't think this is the cause--

 

 

:LOCB_103A4: name_thread 'LOCB'0006: @1 =  0 ;; integer values0006: @2 =  0 ;; integer values:LOCB_300D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££LOCB_300D6: if  00038:   @2 ==  1 ;; integer values004D: jump_if_false ££LOCB_603BD: destroy_sphere @30006: @2 =  0 ;; integer values:LOCB_60050: gosub ££LOCB_17:LOCB_80001: wait  0 ms00D6: if  00038:   @1 ==  1 ;; integer values004D: jump_if_false ££LOCB_11:LOCB_10004E: end_thread:LOCB_1103BC: @3 = create_sphere  2494.91 -1682.17  12.32  1.0 ;; put's sphere in front of cj's house0006: @2 =  1 ;; integer values:LOCB_130050: gosub ££LOCB_1700D6: if  000FF:   actor $PLAYER_ACTOR  0 ()near_point_on_foot  2494.91 -1682.17  12.32 radius  1.0  1.0  3.0004D: jump_if_false ££LOCB_13:LOCB_150394: play_music  10006: @1 =  1 ;; integer values0002: jump ££LOCB_3:LOCB_1700D6: if  28112:   NOT   wasted_or_busted0038:   $ON_MISSION ==  0 ;; integer values00FE:   actor $PLAYER_ACTOR  0 ()near_point  2494.91 -1682.17  12.32 radius  120.0  120.0  80.0004D: jump_if_false ££LOCB_3:LOCB_200051: return

 

 

and the create thread/

 

 

004F: create_thread ££LOCB_1 

 

 

Thanks for any help, I really believe this is an easy situation but is not that obvious to me.

 

 

Link to comment
Share on other sites

From a quick glance, I noticed that you're using this line

 

0038: @2 == 1

 

 

Except that code is for GLOBALS, not LOCALS. You want to use 0039, which will check the value of a local variable.

I'm actually not against democracy though. I'm against things I think are f*cking stupid. I think this is f*cking stupid. - Sweets

Link to comment
Share on other sites

From a quick glance, I noticed that you're using this line

 

0038: @2 == 1

 

 

Except that code is for GLOBALS, not LOCALS. You want to use 0039, which will check the value of a local variable.

Son uv a Bitc*, After an entire day of confusion. Ok --thanks so much, I dont know how that got in there.

Link to comment
Share on other sites

Fixed that but still crashes, like before. I will continue to look at my code against others, but if anyone notices something-- please let me know.

 

Ceedj, thanks for bringing that to my attention it was a problem but evidently not the only one.

Link to comment
Share on other sites

 

:LOCB_3

0001: wait 250

00D6: if  0

0256:  player $PLAYER_CHAR defined

004D: jump_if_false ££LOCB_3

 

you forgot about WAIT in a loop. That freezes the game.

 

Opcode 0112 doesn't be used in the threads, use 'player_defined' check instead of.

Link to comment
Share on other sites

Well it looks like I have to start cleaning up my script's, apparently I don't know all of the basics. It really has been a while since I did any scripting.

 

Thank you everybody for clearing this up for me, I now know what to work on.

 

By the way I looked at the "drunk/high" mod script, and inserted the thread in the same format. Assuming that worked, I figured it was my script-- So I WAS trying to fix it, NOT just ask question/ after question.

 

 

Thanks again,

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.