Quantcast

Jump to content

» «
Photo

Mission Crashes

1 reply to this topic
Pie015
  • Pie015

    6 STAR VETERAN

  • Members
  • Joined: 11 Jun 2010

#1

Posted 14 April 2013 - 07:14 PM

Hey guys, I don't know whats up with my mission but every time I enter the sphere, the game crashes, I looked in my script but couldn't find any error or mistake. Can you guys please help? A really untidy code I know.

CODE

{$CLEO .cs}

//------------MAIN------------
thread 'MISSION1'

:0
wait 0
if
Player.Defined($PLAYER_CHAR)
jf @0
[email protected] = Marker.CreateIconAndSphere(55, 1181.4739, -1362.6329, 14.1687)

:1
wait 0
if and
0102:   actor $PLAYER_ACTOR in_sphere 1181.4739 -1362.6329 14.1687 radius 2.0 2.0 2.0 sphere 0 stopped_on_foot
not Actor.Driving($PLAYER_ACTOR)
jf @1
Marker.Disable([email protected])
Player.CanMove($PLAYER_ACTOR) = False
fade 0 1500
wait 2000
Actor.PutAt($PLAYER_ACTOR, 1183.8512, -1369.7137, 24.0105)
Actor.Angle($PLAYER_ACTOR) = 324.2892
wait 500
0110: clear_player $PLAYER_CHAR wanted_level
04EB: AS_actor $PLAYER_ACTOR crouch 1
[email protected] = Pickup.Create(1240, 15, 1179.2755, -1369.325, 23.9915)
[email protected] = Pickup.Create(1242, 15, 1178.4475, -1372.505, 23.9881)

:2
wait 0
Model.Load(#SNIPER)
Model.Load(#STRETCH)
Model.Load(#MP5LNG)
Model.Load(#COPCARLA)
Model.Load(#MAFBOSS)
Model.Load(#ARMY)
038B: load_requested_models

:3
wait 0
if or
not Model.Available(#SNIPER)
not Model.Available(#STRETCH)
not Model.Available(#MP5LNG)
not Model.Available(#COPCARLA)
not Model.Available(#MAFBOSS)
not Model.Available(#ARMY)
jf @4
wait 0
jump @3

:4
wait 0
01B2: give_actor $PLAYER_ACTOR weapon 34 ammo 150 // Load the weapon model before using this
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 34
0395: clear_area 1 at 1230.9407 -1281.4924 13.0865 radius 20.0
wait 1000
[email protected] = Car.Create(#STRETCH, 1230.9407, -1281.4924, 13.0865)
Car.Angle([email protected]) = 90.0
[email protected] = Car.Create(#COPCARLA, 1239.9238, -1281.2526, 13.0001)
Car.Angle([email protected]) = 90.0
[email protected] = Car.Create(#COPCARLA, 1222.7098, -1280.7329, 12.9619)
Car.Angle([email protected]) = 90.0
0129: [email protected] = create_actor_pedtype 6 model #ARMY in_car [email protected] driverseat
0129: [email protected] = create_actor_pedtype 6 model #ARMY in_car [email protected] driverseat
0129: [email protected] = create_actor_pedtype 6 model #ARMY in_car [email protected] driverseat
01C8: [email protected] = create_actor_pedtype 6 model #ARMY in_car [email protected] passenger_seat 0
01C8: [email protected] = create_actor_pedtype 6 model #ARMY in_car [email protected] passenger_seat 0
01C8: [email protected] = create_actor_pedtype 4 model #MAFBOSS in_car [email protected] passenger_seat 2
0350: set_actor [email protected] maintain_position_when_attacked 1
[email protected] = Marker.CreateAboveActor([email protected])
Marker.SetColor([email protected], 0)
01B2: give_actor [email protected] weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor [email protected] armed_weapon_to 29
01B2: give_actor [email protected] weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor [email protected] armed_weapon_to 29
01B2: give_actor [email protected] weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor [email protected] armed_weapon_to 29
01B2: give_actor [email protected] weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor [email protected] armed_weapon_to 29
01B2: give_actor [email protected] weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor [email protected] armed_weapon_to 29
01B2: give_actor [email protected] weapon 29 ammo 150 // Load the weapon model before using this
01B9: set_actor [email protected] armed_weapon_to 29
wait 500
fade 1 1500
Player.CanMove($PLAYER_CHAR) = True
05D1: AS_actor [email protected] drive_car [email protected] to 1197.2988 -1376.3077 12.8656 speed 25.0 0 model #NULL 0
07F8: car [email protected] follow_car [email protected] radius 5.0
07F8: car [email protected] follow_car [email protected] radius 5.0

:5
wait 0
if or
Actor.Dead($PLAYER_ACTOR)
0741:   actor $PLAYER_ACTOR busted
jf @6
wait 0
jump @MISFAIL

:6
wait 0
if
Actor.Dead([email protected])
jf @5
wait 0

:MISPASS
wait 0
0394: play_music 1
01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1  // MISSION PASSED!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 10000
Pickup.Destroy([email protected])
Pickup.Destroy([email protected])
Car.RemoveReferences([email protected])
Car.RemoveReferences([email protected])
Car.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Marker.Disable([email protected])
0249: release_model #MP5LNG
0249: release_model #SNIPER
0249: release_model #ARMY
0249: release_model #STRETCH
0249: release_model #MAFBOSS
0249: release_model #COPCARLA
wait 1000
end_custom_thread

:MISFAIL
wait 0
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
Pickup.Destroy([email protected])
Pickup.Destroy([email protected])
Car.RemoveReferences([email protected])
Car.RemoveReferences([email protected])
Car.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Marker.Disable([email protected])
0249: release_model #MP5LNG
0249: release_model #SNIPER
0249: release_model #ARMY
0249: release_model #STRETCH
0249: release_model #MAFBOSS
0249: release_model #COPCARLA
wait 1000
jump @0

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#2

Posted 14 April 2013 - 08:05 PM

this cause the crash:
CODE
Player.CanMove($PLAYER_ACTOR) = False


in addition do you have to write the code end_custom_thread with opcode
CODE
0A93: end_custom_thread
or did you insert it in your keywords.txt?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users