|
 |
|
|
|
|
|
GTA Modification Forums
cleo 4 script crashing cleo 4 help
 |
|
 |
| |
spidermight  |
Posted: Wednesday, May 16 2012, 01:13
|
Cleo Modder

Group: Members
Joined: Aug 14, 2008


|
this is strange my script keeps crashing can someone please help me | CODE | {$CLEO .cm} :TestMiss_1 03A4: name_thread "drugwars1" 0050: gosub @TestMiss_main_1 00D6: if 0 0112: wasted_or_busted 004D: jump_if_false @TestMiss_end_1 0050: gosub @TestMiss_fail_1
:TestMiss_end_1 0050: gosub @TestMiss_clep_1 004E: end_thread
:TestMiss_main_1 0317: increment_mission_attempts//here starts the missionscript 0004: $ONMISSION = 1
016A: fade 0 time 500
:load_grove_guytalk wait 0 if Player.Defined($PLAYER_CHAR) else_jump @load_grove_guytalk if 00EC: actor $PLAYER_ACTOR 0 near_point 2512.3623 -1665.8923 radius 100.0 100.0 //done else_jump @load_grove_guytalk Player.CanMove($PLAYER_CHAR, false) Model.Load(#FAM1) Model.Load(#FAM2) Model.Load(#FAM3) Model.Load(#COLT45) Model.Load(#MICRO_UZI) 04ED: load_animation "GANGS"
:grove_talker1 wait 2000 if Model.Available(#FAM1) else_jump @grove_talker1 1@ = Actor.Create(Mission1, #FAM1, 2513.418, -1663.6311, 13.5816) //done Actor.Angle(1@) = 152.6107 Actor.WeaponAccuracy(1@) = 100 0446: set_actor 1@ immune_to_headshots 0 07DD: set_actor 1@ temper_to 100 // see pedstats.dat 03FE: set_actor 1@ money 0 01B2: give_actor 1@ weapon 28 ammo 30000 // Load the weapon model before using this Actor.Health(1@) = 11000
:grove_talker2 wait 2000 if Model.Available(#FAM2) else_jump @grove_talker2 2@ = Actor.Create(Mission1, #FAM2, 2515.1326, -1665.5837, 13.6663) //done //talker 1 Actor.Angle(2@) = 94.4975 Actor.WeaponAccuracy(2@) = 100 0446: set_actor 2@ immune_to_headshots 0 07DD: set_actor 2@ temper_to 100 // see pedstats.dat 03FE: set_actor 2@ money 0 01B2: give_actor 2@ weapon 28 ammo 30000 // Load the weapon model before using this Actor.Health(2@) = 11000
:grove_talker3 wait 2000 if Model.Available(#FAM3) else_jump @grove_talker3 3@ = Actor.Create(Mission1, #FAM3, 2513.5054, -1668.5653, 13.5623) //done Actor.Angle(3@) = 34.2276 Actor.WeaponAccuracy(3@) = 100 0446: set_actor 3@ immune_to_headshots 0 07DD: set_actor 3@ temper_to 100 // see pedstats.dat 03FE: set_actor 3@ money 0 01B2: give_actor 3@ weapon 22 ammo 30000 // Load the weapon model before using this Actor.Health(3@) = 11000
wait 9000 016A: fade 1 time 1000
:animation_talk2 wait 0 if 04EE: animation "GANGS" loaded else_jump @animation_talk2
0605: actor 2@ perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 00BC: show_text_highpriority GXT 'GHTA' time 7000 flag 1 //6 letters max in name wait 7100 00BC: show_text_highpriority GXT 'GHTB' time 7000 flag 1 //6 letters max in name wait 7100 00BC: show_text_highpriority GXT 'GHTC' time 7000 flag 1 //6 letters max in name wait 7100 0792: disembark_instantly_actor 2@ 04EF: release_animation "GANGS" 0605: actor $PLAYER_ACTOR perform_animation_sequence "PRTIAL_GNGTLKA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 00BC: show_text_highpriority GXT 'GHTD' time 7000 flag 1 //6 letters max in name wait 7100 0792: disembark_instantly_actor $PLAYER_ACTOR 04EF: release_animation "GANGS" 016A: fade 0 time 500 Player.CanMove($PLAYER_CHAR, true) 02A8: $Stashicon = create_marker 0 at 2205.1672 -2242.7788 13.5469 wait 1000 016A: fade 1 time 1000 00BC: show_text_highpriority GXT 'GHTE' time 8000 flag 1 //6 letters max in name actor.DestroyInstantly(1@) actor.DestroyInstantly(2@) actor.DestroyInstantly(3@)
:load_enemy_sphere wait 0 if Player.Defined($PLAYER_CHAR) else_jump @load_enemy_sphere if 00EC: actor $PLAYER_ACTOR 0 near_point 2191.1697 -2273.8489 radius 100.0 100.0 //done else_jump @load_enemy_sphere 0164: disable_marker $Stashicon Model.Load(#VIRGO) Model.Load(#CLOVER) Model.Load(#BALLAS1) Model.Load(#BALLAS2) Model.Load(#BALLAS3) Model.Load(#BMYDRUG) Model.Load(#WMYDRUG) Model.Load(#MICRO_UZI) Model.Load(#COLT45) Model.Load(#AK47)
:load_enemy_cars if and 0248: model #VIRGO available 0248: model #CLOVER available else_jump @load_enemy_cars 00A5: $ballacar1 = create_car #VIRGO at 2207.2927 -2241.7725 13.5469 00A5: $ballacar2 = create_car #VIRGO at 2212.4841 -2247.0496 13.5469 00A5: $drugcar1 = create_car #CLOVER at 2201.3047 -2247.4851 13.5469 00A5: $drugcar2 = create_car #CLOVER at 2205.4424 -2252.7615 13.5469 Car.Angle($ballacar1)= 253.6282 Car.Angle($ballacar2)= 19.9827 Car.Angle($drugcar1)= 189.777 Car.Angle($drugcar2)= 66.9303 0224: set_car $ballacar1 health_to 2000 0224: set_car $ballacar2 health_to 2000 0224: set_car $drugcar1 health_to 2000 0224: set_car $drugcar2 health_to 2000
:Balla_spawn1 wait 0 if Model.Available(#BALLAS1) else_jump @Balla_spawn1 4@ = Actor.Create(Mission1, #BALLAS1, 2204.9243, -2246.9775, 13.5469) //done //drops the stash on death Actor.Angle(4@) = 211.9206 Actor.WeaponAccuracy(4@) = 100 0446: set_actor 4@ immune_to_headshots 1 07DD: set_actor 4@ temper_to 100 // see pedstats.dat 03FE: set_actor 4@ money 0 01B2: give_actor 4@ weapon 30 ammo 30000 // ak47 Actor.Health(4@) = 700
:drug_guy_spawn1 wait 0 if Model.Available(#WMYDRUG) else_jump @drug_guy_spawn1 5@ = Actor.Create(Mission1, #WMYDRUG, 2206.0913, -2248.8533, 13.5469) // done // talks to the guy with stash Actor.Angle(5@) = 46.5385 Actor.WeaponAccuracy(5@) = 100 0446: set_actor 5@ immune_to_headshots 1 07DD: set_actor 5@ temper_to 100 // see pedstats.dat 03FE: set_actor 5@ money 0 01B2: give_actor 5@ weapon 28 ammo 30000 // Load the weapon model before using this Actor.Health(5@) = 550
:load_sphere_close_enemys wait 1000 if 00EC: actor $PLAYER_ACTOR 0 near_point 2207.5325 -2247.0615 radius 30.0 30.0 //done else_jump @load_sphere_close_enemys
:kill_enemys wait 100 if 8118: not actor 4@ dead else_jump @TestMiss_pass_1 jump @kill_enemys
:TestMiss_pass_1 00A6: destroy_car $ballacar1 00A6: destroy_car $ballacar2 00A6: destroy_car $drugcar1 00A6: destroy_car $drugcar2 0394: play_music 1 player.ClearWantedLevel($PLAYER_CHAR) 00BA: text_styled 'MBPASS' 1000 ms 2 $MISSION_2 += 1 jump @TestMiss_clep_1
:TestMiss_fail_1 00A6: destroy_car $ballacar1 00A6: destroy_car $ballacar2 00A6: destroy_car $drugcar1 00A6: destroy_car $drugcar2 00BA: text_styled 'MBFAIL' 1000 ms 1 jump @TestMiss_clep_1
:TestMiss_clep_1 0004: $ONMISSION = 0 00D8: mission_cleanup 0051: return | This post has been edited by spidermight on Wednesday, May 16 2012, 05:05
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Deji  |
Posted: Wednesday, May 16 2012, 07:52
|
Coding like a Rockstar!

Group: Members
Joined: Dec 24, 2007


|
| QUOTE (spidermight @ Wednesday, May 16 2012, 05:04) | i found that this opcode | CODE | | 05E2: AS_actor 5@ kill_actor $PLAYER_ACTOR |
this crashes my script wtf i have used it before, where should i put this in my script ? i need it so when you go in the sphere then the actors attack you |
It'll crash if one of the handles isn't valid. You shouldn't be running it in a loop, anyway. | QUOTE | This is a QUOTE from ZAZ CLEO scrypt tutorial:
| QUOTE | The global variable is builded with the $ sign and a a letter or a word or a number or both But using global variables in Cleo scripts can cause heavy bugs or crashs only $PLAYER_CHAR, $PLAYER_ACTOR, $ONMISSION are valid |
So use local variables with sign @ in CLEO (except for $PLAYER_CHAR, $PLAYER_ACTOR, $ONMISSION). |
I prefer to go by the information provided by the author of SB, other globals can be fine http://cleo.sannybuilder.com/?id=3| QUOTE | | Implicitly, a CLEO script should be sufficient for itself and use minimum of the SCM data. However, you can freely use global variables names from the CustomVaribles.ini (for example, $PLAYER_CHAR, $PLAYER_ACTOR, $ONMISSION, etc). | This post has been edited by Deji on Wednesday, May 16 2012, 07:54
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|