arielnmz Posted January 20, 2012 Share Posted January 20, 2012 Well... this is strange... everything worked out fine but... it began to crash the game as soon as I get to this part of the code: :Noname_176704F4: put_actor $PLAYER_ACTOR into_turret_on_object [email protected] offset_from_object_origin -0.3 0.02 1.0 orientation 0 both_side_angle_limit 360.0 lock_weapon 38 0750: set_object [email protected] visibility 0 :Noname_18060001: wait 0 ms 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 00D6: if or8039: not [email protected] == 1 83CA: not object [email protected] exists 004D: jump_if_false @Noname_1859 0465: remove_actor $PLAYER_ACTOR from_turret_mode 0050: gosub @Noname_957 0A93: end_custom_thread :Noname_185900D6: if or00E1: player 0 pressed_key 15 8474: not actor $PLAYER_ACTOR near_object_in_cube [email protected] radius 2.0 2.0 2.0 flag 0 004D: jump_if_false @Noname_1806 0465: remove_actor $PLAYER_ACTOR from_turret_mode[...] What could be wrong..??? I've used scmlog to debug my cleos, and this is what I got so far: It passes through this part without trouble: :Noname_176704F4: put_actor $PLAYER_ACTOR into_turret_on_object [email protected] offset_from_object_origin -0.3 0.02 1.0 orientation 0 both_side_angle_limit 360.0 lock_weapon 38 0750: set_object [email protected] visibility 0 :Noname_18060001: wait 0 ms Then I see parts of other scripts (as usual), but at the end there is a 0001: wait opcode and then the end of the log... what could be the problem??... Link to comment Share on other sites More sharing options...
Deji Posted January 20, 2012 Share Posted January 20, 2012 Would have to see the entire code. Stop recompiling your scripts, though. Link to comment Share on other sites More sharing options...
arielnmz Posted January 20, 2012 Author Share Posted January 20, 2012 here it goes, it is as when I sent my previous post... :Noname_16640871: init_jump_table [email protected] total_jumps 2 default_jump 1 @Noname_2013 jumps 0 @Noname_1767 1 @Noname_1727 -1 @Noname_2013 -1 @Noname_2013 -1 @Noname_2013 -1 @Noname_2013 -1 @Noname_2013 :Noname_17270050: gosub @Noname_957 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 000E: [email protected] -= 1 0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0 0A93: end_custom_thread :Noname_176704F4: put_actor $PLAYER_ACTOR into_turret_on_object [email protected] offset_from_object_origin -0.3 0.02 1.0 orientation 0 both_side_angle_limit 360.0 lock_weapon 38 0750: set_object [email protected] visibility 0 :Noname_18060001: wait 0 ms 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 00D6: if or8039: not [email protected] == 1 83CA: not object [email protected] exists 004D: jump_if_false @Noname_1859 0465: remove_actor $PLAYER_ACTOR from_turret_mode 0050: gosub @Noname_957 0A93: end_custom_thread :Noname_185900D6: if or00E1: player 0 pressed_key 15 8474: not actor $PLAYER_ACTOR near_object_in_cube [email protected] radius 2.0 2.0 2.0 flag 0 004D: jump_if_false @Noname_1806 0465: remove_actor $PLAYER_ACTOR from_turret_mode 0750: set_object [email protected] visibility 1 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.5 0.0 02CE: [email protected] = ground_z_at [email protected] [email protected] [email protected] 034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 9999.0 9999.0 9999.0 collision_check 0 0172: [email protected] = actor $PLAYER_ACTOR Z_angle 000B: [email protected] += 90.0 0177: set_object [email protected] Z_angle_to [email protected] :Noname_20130051: return Link to comment Share on other sites More sharing options...
Deji Posted January 20, 2012 Share Posted January 20, 2012 That's not the whole code... And as I said, stop recompiling your scripts. Recompiling scripts can cause crashes and bugs alone. Link to comment Share on other sites More sharing options...
arielnmz Posted January 20, 2012 Author Share Posted January 20, 2012 Okay.. the problem was that I didnt load the model on the main thread... but I still dont get that about "recompiling"... exactly what do you mean?? Link to comment Share on other sites More sharing options...
fastman92 Posted January 20, 2012 Share Posted January 20, 2012 Okay.. the problem was that I didnt load the model on the main thread... but I still dont get that about "recompiling"... exactly what do you mean?? Source text of CLEO script is .txt file. You can open .txt in Sanny Builder as often as necessary. But instead you compile .cs file in SB. Next time you open (decompile .cs) in Sanny Builder and it`s wrong. You should always open .txt where is original source - including comments, label names, hex structures, constants. .cs isn`t to be decompiled, it`s only for game to work. .txt is what you edit. Link to comment Share on other sites More sharing options...
arielnmz Posted January 20, 2012 Author Share Posted January 20, 2012 Hmmm... ok now I get that... but... I've always done the same without any problems... I'll try not to do it that way thanks guys!!! 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