MGM12188 Posted November 24, 2006 Share Posted November 24, 2006 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 More sharing options...
ceedj Posted November 25, 2006 Share Posted November 25, 2006 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 More sharing options...
MGM12188 Posted November 25, 2006 Author Share Posted November 25, 2006 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 More sharing options...
MGM12188 Posted November 25, 2006 Author Share Posted November 25, 2006 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 More sharing options...
Seemann Posted November 25, 2006 Share Posted November 25, 2006 :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. Sanny Builder 3 • SA Memory Handling • OpenIV • gtamodding.com CLEO.li - The CLEO Library - Official site Link to comment Share on other sites More sharing options...
MGM12188 Posted November 25, 2006 Author Share Posted November 25, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now