Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,171 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

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

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

    2. Site Suggestions

Maro Hannover

Every Mission i make crashes the Game.

Recommended Posts

Maro Hannover

Hi i have Learnt SCM Coding and every mission i make crashes the game. i feel there is a problem with me i everytime went through the tutoriols again and again. Now i made a mission. But when i go to the trigger the $ONMISSION == 1 code starts but nothing happen then i figured that i forgot to rename the mission file. then i have corrected the mistake then i enter the mission the Game Crashes

Here is the code of my Mission

{$CLEO .cm} :MissionStart03A4: name_thread "TEST"  gosub @MissionBeginif    wasted_or_bustedthen    gosub @MissionFailedendgosub @MissionCleanupend_thread :MissionBeginwait 1000247: load_model #CELLPHONE038B: load_requested_modelsif0248:   model #CELLPHONE available004D: jump_if_false @MIssionBeginwait 1000                                                            0729: AS_actor $PLAYER_ACTOR hold_cellphone 100BB: show_text_lowpriority GXT 'TXT02' time 3000 flag 1   //F: Hi Carl I got a job for youwait 300000BC: show_text_highpriority GXT 'TXT03' time 2000 flag 1  //CJ: What is it Franklin?wait 200000BB: show_text_lowpriority GXT 'TXT04' time 3000 flag 1   //F: There is a Corrupt Cop at AShospital go and Kill him.wait 30000729: AS_actor $PLAYER_ACTOR hold_cellphone 00247: load_model #LAPD10247: load_model #COPCARLA0247: load_model #DESERT_EAGLEif0248:   model #LAPD1 available0248:   model #COPCARLA available0248:   model #DESERT_EAGLE availablejf @MissionFailed00A5: [email protected] = create_car #COPCARLA at 1140.2621 -1340.9778 13.66310229: set_car [email protected] primary_color_to 2 secondary_color_to 10674: set_car_model [email protected] numberplate "Corrupt"0129: [email protected] = create_actor_pedtype 23 model #LAPD1 in_car [email protected] driverseat01B2: give_actor [email protected] weapon 24 ammo 60 // Load the weapon model before using this02A7: [email protected] = create_icon_marker_and_sphere 20 at 1215.6962 -1391.8594 13.2972if00EC:   actor $PLAYER_ACTOR sphere 0 near_point 1215.6962 -1391.8594 13.2972 radius 80.0 80.0Marker.Disable([email protected])jf @MissionFailed00BB: show_text_lowpriority GXT 'TXT05' time 10000 flag 1  // Find a car in 20 secs or mission failed.already have? wait in your car wait 20000if0449: actor $PLAYER_ACTOR in_a_carjf @MissionFailed00BB: show_text_lowpriority GXT 'TXT06' time 10000 flag 1 //Where is that Bitch02A7: [email protected] = create_icon_marker_and_sphere 0 at 1143.7336 -1392.3125 13.5966repeat until 0100:   actor $PLAYER_ACTOR in_sphere 1143.7336 -1392.3125 13.5966 4.0 4.0 4.0 sphere 1 in_carMarker.Disable([email protected])0187: [email protected] = create_marker_above_actor [email protected]: show_text_lowpriority GXT 'TXT07' time 3000 flag 1 //The Cop is there chase him.don't kill him00AD: set_car [email protected] max_speed_to 20.000AE: unknown_set_car [email protected] to_ignore_traffic_lights  200A7: car [email protected] drive_to 1149.6721 -1224.9967 17.4142repeat until01AD:   car [email protected] sphere 0 near_point 1149.6721 -1224.9967 17.4142 radius 6.0 6.00633: AS_actor [email protected] exit_carActor.Health([email protected])=25002E2: set_actor [email protected] weapon_accuracy_to 7505E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR00BB: show_text_lowpriority GXT 'TXT08' time 3000 flag 1  //The +r+Cop+w+ is out of his car kill himrepeat until0118:   actor [email protected] deadMarker.Disable([email protected])0729: AS_actor $PLAYER_ACTOR hold_cellphone 100BB: show_text_lowpriority GXT 'TXT09' time 3000 flag 1  //CJ: Franklin. The Cop is dead.wait 300000BC: show_text_highpriority GXT 'TXT10' time 3000 flag 1  //F: i am sending you the money on your bank account.0729: AS_actor $PLAYER_ACTOR hold_cellphone 000BA: show_text_styled GXT "TXT11" time 2000 style 2  // Reward 10000$0109: player $PLAYER_CHAR money += 10000wait 2000return :MissionFailedwait 10000BA: show_text_styled GXT "TXT01" time 1000 style 2  // Mission Failedreturn :MissionCleanupwait 100Car.RemoveReferences([email protected])Actor.RemoveReferences([email protected])0249: release_model #CELLPHONE0249: release_model #DESERT_EAGLE0249: release_model #LAPD10249: release_model #COPCARLA$ONMISSION = 0mission_cleanupreturnend_thread
Edited by Maro Hannover

Share this post


Link to post
Share on other sites
Ashwin.Star

you forgot to load requested Models here

0247: load_model #LAPD10247: load_model #COPCARLA0247: load_model #DESERT_EAGLE//<----- here --------->//if0248:   model #LAPD1 available0248:   model #COPCARLA available0248:   model #DESERT_EAGLE availablejf @MissionFailed 

And, Why failing this mission if models are not available ????

that's not player's fault,

 

i found this as the main reason of Crash,

think if models are not available,

then mission is failed,

it's okay

thenin cleaning up the process,

-------------

wait 100
Car.RemoveReferences(1@)
Actor.RemoveReferences(2@)

------------

you have not created any car or any actor, during this run,

So [email protected] & [email protected] are not handles of any car or actor,

that makes the crash i think.

----------------

ALSO,

Stop making jump to missionFail label,

is player in not in car or in sphere,

just make a loop there,

--------------

Edited by Ashwin.Star

Share this post


Link to post
Share on other sites
Maro Hannover

you forgot to load requested Models here

0247: load_model #LAPD10247: load_model #COPCARLA0247: load_model #DESERT_EAGLE//<----- here --------->//if0248:   model #LAPD1 available0248:   model #COPCARLA available0248:   model #DESERT_EAGLE availablejf @MissionFailed 

And, Why failing this mission if models are not available ????

that's not player's fault,

 

i found this as the main reason of Crash,

think if models are not available,

then mission is failed,

it's okay

thenin cleaning up the process,

-------------

wait 100

Car.RemoveReferences(1@)

Actor.RemoveReferences(2@)

------------

you have not created any car or any actor, during this run,

So [email protected] & [email protected] are not handles of any car or actor,

that makes the crash i think.

----------------

ALSO,

Stop making jump to missionFail label,

is player in not in car or in sphere,

just make a loop there,

--------------

Ok Indian Man but i want to know my learning mistake every single mission i make crashes

Share this post


Link to post
Share on other sites
Silent

 

00A5: [email protected] = create_car #COPCARLA at 1140.2621 -1340.9778 13.66310229: set_car [email protected] primary_color_to 2 secondary_color_to 10674: set_car_model [email protected] numberplate "Corrupt"
0674 takes a model name as a parameter and the string HAS to be 8 chars long, so it should look like this:

 

 

0674: set_car_model #COPCARLA numberplate "CORRUPT_"00A5: [email protected] = create_car #COPCARLA at 1140.2621 -1340.9778 13.66310229: set_car [email protected] primary_color_to 2 secondary_color_to 1
Besides, Ashwin has a point, correct those mistakes before trying to proceed.

Share this post


Link to post
Share on other sites
Deji

you forgot to load requested Models here

0247: load_model #LAPD10247: load_model #COPCARLA0247: load_model #DESERT_EAGLE//<----- here --------->//if0248:   model #LAPD1 available0248:   model #COPCARLA available0248:   model #DESERT_EAGLE availablejf @MissionFailed 
And, Why failing this mission if models are not available ????

that's not player's fault,

 

i found this as the main reason of Crash,

think if models are not available,

then mission is failed,

 

Not true, read this: http://gtag.gtagaming.com/forums/index.php?showtopic=483

 

Use 0248 to check models are loaded or 038B if you don't mind the game freezing while they load (obviously doesn't matter if the screen has faded).

Share this post


Link to post
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

×

Important Information

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