Jump to content

Problem with custom script


shindogg

Recommended Posts

ok, so i have a .cs file that i was workin with and it keeps crashin the game. it's a .cs so i shouldnt need to start a new game right? please tell me what i need to fix so the game willl work with it. heres the script:

 

{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------:SCJ wait 1500 9@ = 10.0 11@ = 2.0 12@ = 0.0 08C0: clear $10569 bit 7 08C0: clear $10569 bit 8 08C0: clear $10569 bit 9 08C0: clear $10569 bit 10 08C0: clear $10569 bit 11 08C0: clear $10569 bit 12 08C0: clear $10569 bit 13 08C0: clear $10569 bit 14 08C0: clear $10569 bit 15 08C0: clear $10569 bit 16 :SCJ_116wait 50 if   Player.Defined($PLAYER_CHAR)else_jump @SCJ_116 if80AC:   NOT   is_char $PLAYER_CHAR on jetpack80DF:   NOT   is_char $PLAYER_CHAR driving8091:   NOT   is_char $PLAYER_CHAR weapon 46;; parachuteelse_jump @SCJ_116 gosub @SCJ_3337 gosub @SCJ_3430 gosub @SCJ_1211 if   not Actor.Driving($PLAYER_ACTOR)else_jump @SCJ_4175 if 04EE:   animation "PARACHUTE" loaded else_jump @SCJ_3317 gosub @SCJ_1005 0090: $10568 = float 9@ to_integer 04F7: status_text $10568 type 1 line 4 GXT 'DUMMY' // global_variable04F7: status_text $10571 type 1 line 3 GXT 'DUMMY' // global_variable  // Power 0819: 16@ = actor $PLAYER_ACTOR distance_from_ground 06AC: 8@ = actor $PLAYER_ACTOR movement_speed gosub @SCJ_3551 gosub @SCJ_4047 gosub @SCJ_3695 if   not 16@ > 2.0 else_jump @SCJ_373 gosub @SCJ_849 gosub @SCJ_1488 gosub @SCJ_2034 jump @SCJ_3207 :SCJ_373if $2395 == 0else_jump @SCJ_116 if 84AD:   not actor $PLAYER_ACTOR in_water else_jump @SCJ_3207 if  16@ > 3.0 else_jump @SCJ_3186 08BA: set $10569 bit 16 Actor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1)if and  not Actor.Animation($PLAYER_ACTOR) == "FALL_SKYDIVE_ACCEL"  not Actor.Animation($PLAYER_ACTOR) == "FALL_SKYDIVE"else_jump @SCJ_550 0687: clear_actor $PLAYER_ACTOR task 12@ = 0.0 jump @SCJ_611 :SCJ_550if 00E1:   player 0 pressed_key 8 else_jump @SCJ_732 wait 250 if 08B4:   test $10569 bit 12 else_jump @SCJ_604 08C0: clear $10569 bit 12 jump @SCJ_611 :SCJ_60408BA: set $10569 bit 12 :SCJ_611if 08B4:   test $10569 bit 12 else_jump @SCJ_681 0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE_ACCEL" IFP_file "PARACHUTE" 1.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB jump @SCJ_732 :SCJ_6810812: AS_actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE_ACCEL" IFP_file "PARACHUTE" 1.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB :SCJ_732gosub @SCJ_2887 gosub @SCJ_2371 gosub @SCJ_2516 if 00E1:   player 0 pressed_key 16 else_jump @SCJ_116 gosub @SCJ_4009 0687: clear_actor $PLAYER_ACTOR task Actor.Angle($PLAYER_ACTOR) = 4@wait 3000 jump @SCJ_116 :SCJ_802if 08B4:   test $10569 bit 16 else_jump @SCJ_842 Actor.SetImmunities($PLAYER_ACTOR, 0, 0, 0, 0, 0)08C0: clear $10569 bit 16 :SCJ_842jump @SCJ_116 :SCJ_849if and88B4:   not test $10569 bit 14 00E1:   player 0 pressed_key 5 80E1:   not player 0 pressed_key 7  17@ > 499 else_jump @SCJ_1003 04C4: store_coords_to 20@ 21@ 22@ from_actor $PLAYER_ACTOR with_offset -5.0 5.0 0.0 04C4: store_coords_to 22@ 23@ 24@ from_actor $PLAYER_ACTOR with_offset 5.0 5.0 0.0 09C0: 0@ = get_random_car_in_area 20@ 21@ 22@ 23@ 15.0 with_actors -1 if 056E:   car 0@ defined else_jump @SCJ_1003 08BA: set $10569 bit 14 :SCJ_1003return :SCJ_1005if 88B4:   not test $10569 bit 13 else_jump @SCJ_1061 if and00E1:   player 0 pressed_key 10 00E1:   player 0 pressed_key 17  17@ > 399 else_jump @SCJ_1202 08BA: set $10569 bit 13 :SCJ_1061if or80E1:   not player 0 pressed_key 11 80E1:   not player 0 pressed_key 17 else_jump @SCJ_1195 17@ -= 3 008A: $10571 = 17@ // (int) $10571 /= 5 if  17@ > 10 else_jump @SCJ_1195 008F: 20@ = integer $10571 to_float 20@ *= 0.01 20@ -= 1.0 0097: make 20@ absolute_float if  0.4 > 20@ else_jump @SCJ_1188 20@ = 0.4 :SCJ_1188015D: set_gamespeed 20@ return :SCJ_119508C0: clear $10569 bit 13 :SCJ_1202015D: set_gamespeed 1.0 return :SCJ_1211if and00E1:   player 0 pressed_key 11 00E1:   player 0 pressed_key 14  17@ > 99 else_jump @SCJ_1486 20@ = 48701 :SCJ_12580652: 21@ = integer_stat 20@ if   not 21@ == 1180457 else_jump @SCJ_1322 if   not 20@ == 50461 else_jump @SCJ_1486 20@ += 10 jump @SCJ_1258 :SCJ_13220922: set_camera_zoom_in_factor 70.0 out_factor 200.0 timelimit 200 mode 1 wait 200 20@ += -7 0652: 21@ = integer_stat 20@ 0092: 22@ = float 21@ to_integer 0093: 22@ = integer 22@ to_float 20@ += 1 0652: 21@ = integer_stat 20@ 0092: 23@ = float 21@ to_integer 0093: 23@ = integer 23@ to_float 02CE: 24@ = ground_z_at 22@ 23@ 600.0 Actor.PutAt($PLAYER_ACTOR, 22@, 23@, 24@)wait 200 02CE: 24@ = ground_z_at 22@ 23@ 600.0 005B: 24@ += 16@ // (float) Actor.PutAt($PLAYER_ACTOR, 22@, 23@, 24@)17@ -= 100 :SCJ_1486return :SCJ_1488if and00E1:   player 0 pressed_key 7  17@ > 6 else_jump @SCJ_2032 wait 0 17@ -= 5 008A: $10571 = 17@ // (int) $10571 /= 5 if 00E1:   player 0 pressed_key 7 else_jump @SCJ_2032 04C4: store_coords_to 20@ 21@ 22@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 04C4: store_coords_to 23@ 24@ 25@ from_actor $PLAYER_ACTOR with_offset -20.0 -20.0 0.0 04C4: store_coords_to 25@ 26@ 27@ from_actor $PLAYER_ACTOR with_offset 20.0 -20.0 0.0 073E: get_car_in_sphere 20@ 21@ 22@ radius 10.0 model #INFO handle_as 0@ if 056E:   car 0@ defined else_jump @SCJ_1686 jump @SCJ_1726 :SCJ_168609C0: 0@ = get_random_car_in_area 23@ 24@ 25@ 26@ 40.0 with_actors -1 if 056E:   car 0@ defined else_jump @SCJ_1488 :SCJ_1726046C: 20@ = car 0@ driver if 056D:   actor 20@ defined else_jump @SCJ_1755 Actor.DestroyInstantly(20@):SCJ_17550407: store_coords_to 20@ 21@ 22@ from_car 0@ with_offset 0.0 0.0 0.0 04C4: store_coords_to 23@ 24@ 25@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 0063: 20@ -= 23@ // (float) 0063: 21@ -= 24@ // (float) 20@ *= 4.0 21@ *= 4.0 02F7: 23@ = sine 20@ // (float) 02F7: 24@ = sine 21@ // (float) if   not 20@ > 0.0 else_jump @SCJ_1896 23@ *= -1.0 :SCJ_1896if   not 21@ > 0.0 else_jump @SCJ_1927 24@ *= -1.0 :SCJ_192723@ *= 0.07 24@ *= 0.07 07D5: set_car 0@ velocity_in_direction_XYZ 23@ 24@ 0.01 rotation_velocitiesXY 0.0 0.0 unk 0.0 066B: 26@ = attach_particle "SHOOTLIGHT" to_car 0@ with_offset 0.0 2.0 1.0 flag 1 064C: make_particle 26@ visible 064F: remove_references_to_particle 26@ jump @SCJ_1488 :SCJ_2032return :SCJ_2034if and00E1:   player 0 pressed_key 10 00E1:   player 0 pressed_key 14 else_jump @SCJ_2369 04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 1.4 04C4: store_coords_to 24@ 25@ 26@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 7.6 if 06BD:   no_obstacles_between 21@ 22@ 23@ and 24@ 25@ 26@ solid 1 car 1 actor 1 object 1 particle 1 else_jump @SCJ_2369 17@ -= 70 20@ = 50 066A: 21@ = attach_particle "JETTHRUST" to_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.0 rotation 0.0 0.01 0.0 flag 1 066A: 22@ = attach_particle "PRT_SAND" to_actor $PLAYER_ACTOR with_offset 0.0 0.0 -4.0 rotation 0.0 0.01 0.0 flag 1 064C: make_particle 21@ visible 064C: make_particle 22@ visible :SCJ_2281wait 20 083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 9.0 0819: 16@ = actor $PLAYER_ACTOR distance_from_ground 20@ += -1 if   not 20@ == 0 else_jump @SCJ_2359 if 04B5:   16@ >= 9.0 // @ >= any else_jump @SCJ_2281 :SCJ_23590650: destroy_particle 21@ 0650: destroy_particle 22@ :SCJ_2369return :SCJ_2371if and00E1:   player 0 pressed_key 14 80E1:   not player 0 pressed_key 10 80E1:   not player 0 pressed_key 11 else_jump @SCJ_2514 wait 400 if 88B4:   not test $10569 bit 9 else_jump @SCJ_2507 066A: 3@ = attach_particle "EXPLOSION_FUEL_CAR" to_actor $PLAYER_ACTOR with_offset 0.0 2.0 0.0 rotation 0.0 0.01 0.0 flag 1 064C: make_particle 3@ visible 064F: remove_references_to_particle 3@ 08BA: set $10569 bit 9 jump @SCJ_2514 :SCJ_250708C0: clear $10569 bit 9 :SCJ_2514return :SCJ_2516if and  not 16@ > 15.0  16@ > 2.0 08B4:   test $10569 bit 9 else_jump @SCJ_2885 04C4: store_coords_to 20@ 21@ 22@ from_actor $PLAYER_ACTOR with_offset -10.0 -10.0 0.0 04C4: store_coords_to 22@ 23@ 24@ from_actor $PLAYER_ACTOR with_offset 10.0 -10.0 0.0 09C0: 0@ = get_random_car_in_area 20@ 21@ 22@ 23@ 30.0 with_actors -1 if 056E:   car 0@ defined else_jump @SCJ_2885 046C: 25@ = car 0@ driver if 056D:   actor 25@ defined else_jump @SCJ_2681 Actor.DestroyInstantly(25@):SCJ_26810407: store_coords_to 20@ 21@ 22@ from_car 0@ with_offset 0.0 0.0 0.0 04C4: store_coords_to 23@ 24@ 25@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 0063: 23@ -= 20@ // (float) 0063: 24@ -= 21@ // (float) 23@ *= -0.006 24@ *= -0.006 006B: 23@ *= 9@ // (float) 006B: 24@ *= 9@ // (float) 0073: 23@ /= 16@ // (float) 0073: 24@ /= 16@ // (float) 07D5: set_car 0@ velocity_in_direction_XYZ 23@ 24@ 0.0 rotation_velocitiesXY 0.0 0.0 unk 0.0 066B: 28@ = attach_particle "SHOOTLIGHT" to_car 0@ with_offset 0.0 2.0 1.0 flag 1 064C: make_particle 28@ visible 064F: remove_references_to_particle 28@ :SCJ_2885return :SCJ_28870494: get_joystick 0 data_to 1@ 2@ 3@ 4@ 0093: 1@ = integer 1@ to_float 0093: 2@ = integer 2@ to_float 1@ *= 0.02 006B: 1@ *= 11@ // (float) 4@ = Actor.Angle($PLAYER_ACTOR)0063: 4@ -= 1@ // (float) 1@ *= 4.0 2@ *= 0.02 006B: 2@ *= 11@ // (float) 005B: 12@ += 2@ // (float) if  -80.0 > 12@ else_jump @SCJ_3020 12@ = -80.0 :SCJ_3020if  12@ > 80.0 else_jump @SCJ_3051 12@ = 80.0 :SCJ_3051083E: set_actor $PLAYER_ACTOR rotation 12@ 1@ 4@ while_in_air 5@ = 360.0 0063: 5@ -= 4@ // (float) 02F6: 6@ = cosine 5@ // (float) 02F7: 7@ = sine 5@ // (float) 006B: 6@ *= 9@ // (float) 006B: 7@ *= 9@ // (float) 02F6: 13@ = cosine 12@ // (float) 02F7: 14@ = sine 12@ // (float) 006B: 6@ *= 14@ // (float) 006B: 7@ *= 14@ // (float) 0087: 15@ = 9@ // (float) 006B: 15@ *= 13@ // (float) 083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 6@ 7@ 15@ 17@ += -1 return :SCJ_3186if  8@ > 8.0 else_jump @SCJ_116 :SCJ_3207if or  Actor.Animation($PLAYER_ACTOR) == "FALL_SKYDIVE_ACCEL"  Actor.Animation($PLAYER_ACTOR) == "FALL_SKYDIVE"else_jump @SCJ_116 083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 0.0 0687: clear_actor $PLAYER_ACTOR task wait 250 12@ = 0.0 Actor.Angle($PLAYER_ACTOR) = 4@jump @SCJ_116 :SCJ_331704ED: load_animation "PARACHUTE" jump @SCJ_116 :SCJ_33370209: 20@ = random_int_in_ranges 1 3 005A: 17@ += 20@ // (int) if  17@ > 500 else_jump @SCJ_3381 17@ = 500 :SCJ_3381008A: $10571 = 17@ // (int) $10571 /= 5 if 08B4:   test $10569 bit 15 else_jump @SCJ_3428 08C0: clear $10569 bit 15 17@ += -2 :SCJ_3428return :SCJ_343021@ = 0 0087: 25@ = 9@ // (float) 25@ /= 15.0 if   not 25@ > 1.0 else_jump @SCJ_3486 25@ = 1.0 :SCJ_3486if   Actor.Animation($PLAYER_ACTOR) == &45107(21@,71v)else_jump @SCJ_3524 0393: actor $PLAYER_ACTOR perform_animation &45107(21@,71v) at 25@ times_normal_rate :SCJ_352421@ += 1 if  21@ == 71 else_jump @SCJ_3486 return :SCJ_3551if or80E1:   not player 0 pressed_key 11 00E1:   player 0 pressed_key 10 else_jump @SCJ_3604 if or80E1:   not player 0 pressed_key 10 00E1:   player 0 pressed_key 11 else_jump @SCJ_3652 jump @SCJ_3693 :SCJ_36049@ -= 2.0 if  5.0 > 9@ else_jump @SCJ_3693 9@ = 5.0 jump @SCJ_3693 :SCJ_36529@ += 2.0 if  9@ > 200.0 else_jump @SCJ_3693 9@ = 200.0 :SCJ_3693return :SCJ_3695if  8@ > 60.0 else_jump @SCJ_4009 if 88B4:   not test $10569 bit 8 else_jump @SCJ_3796 08BA: set $10569 bit 8 066A: 30@ = attach_particle "PRT_SAND" to_actor $PLAYER_ACTOR with_offset 0.0 1.0 0.0 rotation 0.0 0.01 0.0 flag 1 064C: make_particle 30@ visible :SCJ_3796if  8@ > 130.0 else_jump @SCJ_4021 if 88B4:   not test $10569 bit 10 else_jump @SCJ_3898 08BA: set $10569 bit 10 066A: 29@ = attach_particle "PRT_SAND2" to_actor $PLAYER_ACTOR with_offset 0.0 1.0 0.0 rotation 0.0 0.01 0.0 flag 1 064C: make_particle 29@ visible :SCJ_3898if  8@ > 180.0 else_jump @SCJ_4033 if 88B4:   not test $10569 bit 11 else_jump @SCJ_4045 08BA: set $10569 bit 11 066A: 27@ = attach_particle "SMOKE_FLARE" to_actor $PLAYER_ACTOR with_offset 0.0 1.0 0.0 rotation 0.0 0.01 0.0 flag 1 064C: make_particle 27@ visible jump @SCJ_4045 :SCJ_400908C0: clear $10569 bit 8 0650: destroy_particle 30@ :SCJ_402108C0: clear $10569 bit 10 0650: destroy_particle 29@ :SCJ_403308C0: clear $10569 bit 11 0650: destroy_particle 27@ :SCJ_4045return :SCJ_4047if   not 18@ == 7 else_jump @SCJ_4157 092B: 0@ = group $PLAYER_GROUP member 18@ if 056D:   actor 0@ defined else_jump @SCJ_4142 if and  not Actor.Dead(0@)88B6:   not test $10569 bit 18@ else_jump @SCJ_4166 08BC: set $10569 bit 18@ jump @SCJ_4166 :SCJ_414208C2: clear $10569 bit 18@ jump @SCJ_4166 :SCJ_415718@ = 0 return :SCJ_416618@ += 1 return :SCJ_41750151: remove_status_text $10568 0151: remove_status_text $10571 jump @SCJ_116:SCJ_4177wait 250 if  Player.Defined($PLAYER_CHAR) else_jump @SCJ_4186 1@ = Car.Model(0@)Model.Load(1@):SCJ_4178wait 0 if   Model.Available(1@)else_jump @SCJ_4178 046C: 7@ = car 0@ driver if 056D:   actor 7@ defined else_jump @SCJ_4182 Actor.DestroyInstantly(7@):SCJ_41820407: store_coords_to 10@ 11@ 12@ from_car 0@ with_offset 0.0 0.0 0.0 2@ = Car.Angle(0@)03F3: get_car 0@ primary_color_to 3@ secondary_color_to 4@ 0A12: get_car 0@ tertiary_color_to 5@ quaternary_color_to 6@ 7@ = Car.Health(0@)Car.Destroy(0@)0@ = Car.Create(1@, 10@, 11@, 12@)Model.Destroy(1@)Car.Angle(0@) = 2@0229: set_car 0@ primary_color_to 3@ secondary_color_to 4@ 0A11: set_car 0@ tertiary_color_to 5@ quaternary_color_to 6@ Car.Health(0@) = 7@0208: 8@ = random_float_in_ranges 2.0 5.0 0208: 9@ = random_float_in_ranges 0.045 0.075 :SCJ_4184wait 50 if and056E:   car 0@ defined 80E1:   not player 0 pressed_key 5 else_jump @SCJ_4186 08BA: set $10569 bit 15 0407: store_coords_to 10@ 11@ 12@ from_car 0@ with_offset 0.0 0.0 0.0 02CE: 3@ = ground_z_at 10@ 11@ 12@ 0087: 4@ = 12@ // (float) 0063: 4@ -= 3@ // (float) 0087: 5@ = 4@ // (float) 006B: 5@ *= 8@ // (float) 02F7: 6@ = sine 5@ // (float) 006B: 6@ *= 9@ // (float) 07D5: set_car 0@ velocity_in_direction_XYZ 0.0 0.0 6@ rotation_velocitiesXY 0.0 0.0 unk 0.0 if 80E1:   not player 0 pressed_key 7 else_jump @SCJ_4188 if  1 > $10571 else_jump @SCJ_4184 :SCJ_4186Car.RemoveReferences(0@)08C0: clear $10569 bit 14 return :SCJ_4188wait 50 if and056E:   car 0@ defined 80E1:   not player 0 pressed_key 5 else_jump @SCJ_4186 08BA: set $10569 bit 15 0407: store_coords_to 10@ 11@ 12@ from_car 0@ with_offset 0.0 0.0 0.0 04C4: store_coords_to 13@ 14@ 15@ from_actor $PLAYER_ACTOR with_offset 0.0 20.0 0.0 0063: 13@ -= 10@ // (float) 0063: 14@ -= 11@ // (float) 0063: 15@ -= 12@ // (float) 13@ *= 0.01 14@ *= 0.01 15@ *= 0.01 07D5: set_car 0@ velocity_in_direction_XYZ 13@ 14@ 15@ rotation_velocitiesXY 0.0 0.0 unk 0.0 if  1 > $10571 else_jump @SCJ_4188 jump @SCJ_4186 :SCJ_41920926: $SCRIPT_STATUS = external_script_status 78 (CARDRIVER) if  $SCRIPT_STATUS == 0 else_jump @SCJ_4196 0926: $SCRIPT_STATUS = external_script_status 79 (HELIDRIVER) if  $SCRIPT_STATUS == 0 else_jump @SCJ_4196 0926: $SCRIPT_STATUS = external_script_status 81 (INT) if  $SCRIPT_STATUS == 0 else_jump @SCJ_4196 &46319 = 0 return :SCJ_4196&46319 = 1 return:SCJ_4198wait 3 if 8449:   not actor $PLAYER_ACTOR in_a_car else_jump @SCJ_4200 if and00E1:   player 0 pressed_key 600E1:   player 0 pressed_key 16else_jump @SCJ_4200 04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 17.5 0.5 0565: create_soundless_explosion_at 0@ 1@ 2@ type 2 020C: create_explosion_with_radius 8 at 0@ 1@ 2@ jump @SCJ_4200 :SCJ_4200wait 1 if 8449:   not actor $PLAYER_ACTOR in_a_car else_jump @SCJ_4198 if and 00E1:   player 0 pressed_key 1680E1:   NOT   player 0 pressed_key 180E1:   NOT   player 0 pressed_key 6else_jump @SCJ_4198 04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.1 0.1 0.2 0565: create_soundless_explosion_at 0@ 1@ 2@ type 1 020C: create_explosion_with_radius 8 at 0@ 0@ 0@ jump @SCJ_4198

 

Link to comment
Share on other sites

 

oh. like @1 and so on? im not really an expert with script

You mean invers 1@, and note the limit for threads

maximum 32@,

33@ is used as timer

 

Link to comment
Share on other sites

i meant 1@ but i typed @1 by mistake. thanks for sharin. but it seems ive ran out of varibles, because i guess global varibles dont work in .cs . before i saw the post of the limit 31@ i had thought i could use 32@ and above.

Link to comment
Share on other sites

 

Maximum is @31 or 31@ depends on which MB you use.

@32 and @33 are timer.

Thx for correction. You are right.

 

 

i meant 1@ but i typed @1 by mistake. thanks for sharin. but it seems ive ran out of varibles, because i guess global varibles dont work in .cs . before i saw the post of the limit 31@ i had thought i could use 32@ and above.

 

And yes, Globals can make problems in CS scripts

Have look to this post

I used the Cleo opcodes 0AB3 and 0AB4 to make the Globals safe.

 

I testet it with the mission "Torenos last Flight" and made a strange experience with a heavy bug

but only by completing the mission successful.

I had alook into the mission passed section of "Torenos last Flight" and only i found was

0004: $1522 =  2  ;; integer values

I asume the global variable setting of the mission did corrupt the global variable of the cleo script.

And right, I used then

0AB3: var 99 = 0

0AB4: $Devilon1 = var 99

00D6: if  0

0038:  $Devilon1 ==  0  // integer values

004D: jump_if_false @FlyC_6

0AB3: var 99 = 1

 

And the script works correct now.

An exemble for Seemanns hint in the Sanny-help for Cleo-scripts:

 

such a script becomes very sensible to the any main.scm change. Implicitly, a CLEO script should be sufficient for itself and use minimum of the SCM data
Edited by ZAZ
Link to comment
Share on other sites

  • 2 weeks later...
Maximum is @31 or 31@ depends on which MB you use.

@32 and @33 are timer.

Thx for correction. You are right.

 

 

i meant 1@ but i typed @1 by mistake. thanks for sharin. but it seems ive ran out of varibles, because i guess global varibles dont work in .cs . before i saw the post of the limit 31@ i had thought i could use 32@ and above.

 

And yes, Globals can make problems in CS scripts

Have look to this post

I used the Cleo opcodes 0AB3 and 0AB4 to make the Globals safe.

 

I testet it with the mission "Torenos last Flight" and made a strange experience with a heavy bug

but only by completing the mission successful.

I had alook into the mission passed section of "Torenos last Flight" and only i found was

0004: $1522 =  2  ;; integer values

I asume the global variable setting of the mission did corrupt the global variable of the cleo script.

And right, I used then

0AB3: var 99 = 0

0AB4: $Devilon1 = var 99

00D6: if  0

0038:   $Devilon1 ==  0  // integer values

004D: jump_if_false @FlyC_6

0AB3: var 99 = 1

 

And the script works correct now.

An exemble for Seemanns hint in the Sanny-help for Cleo-scripts:

 

such a script becomes very sensible to the any main.scm change. Implicitly, a CLEO script should be sufficient for itself and use minimum of the SCM data

well i tried and tried to make it work and it still crashes. its all 1 thread, so i thought it would work fine. i guess i wont be able to give cj any super powers through cs, unless somebody here knows a better way.

Link to comment
Share on other sites

All I can say is don't give up. You'll get it if you keep trying. It's practicaly impossible to not get if you try and try and practice and practice. So just keep experimenting. Try lil things first and upgrade to bigger and bigger things just like a experimenting teenage girl.

Edited by Persanity
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
  • 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.