ReeferSmoke Posted June 10, 2006 Share Posted June 10, 2006 (edited) Here is my code: 0004: $CORDOFF1 = 1 0004: $CORDOFF2 = 1 :MOD_MENU_103A4: name_thread 'MODMENU':MOD_MENU_20001: wait 250 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false ££MOD_MENU_200D6: if 203EE: player $PLAYER_CHAR controllable80DF: NOT actor $PLAYER_ACTOR driving00E1: key pressed 0 8; Group Control Forward;00E1: key pressed 0 4; Action004D: jump_if_false ££MOD_MENU_2 0050: gosub ££ON_OFF_1;054C: use_GXT_table 'MAIN'0512: permanent text box 'CLOTHA'0581: toggle_radar 0 (off)01B4: set player $PLAYER_CHAR frozen_state 0 (frozen)08D4: @0 = create_panel_with_title 'FET_OPT' position 29.0 145.0 width 186.0 columns 2 interactive 1 background 1 alignment 108DB: set_panel @0 column 0 header 'DUMMY' data 'ZCOORD' 'ZCOORD' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'08DB: set_panel @0 column 1 header 'DUMMY' data [email protected] [email protected] 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'09DB: set_panel @0 column 0 width 16509DB: set_panel @0 column 1 width 50 090E: set_panel @0 active_row @1:MOD_MENU_30001: wait 0 ms00D6: if 000E1: key_pressed 0 15004D: jump_if_false ££MOD_MENU_408DA: remove_panel @003E6: remove_text_box0581: toggle_radar 1 (on)01B4: set_player $PLAYER_CHAR frozen_state 1 (unfrozen)0002: jump ££MOD_MENU_2:MOD_MENU_400D6: if 000E1: key_pressed 0 16004D: jump_if_false ££MOD_MENU_308D7: @1 = panel @0 active_row08DA: remove_panel @003E6: remove_text_box0581: toggle_radar 1 (on)01B4: set_player $PLAYER_CHAR frozen_state 1 (unfrozen)0871: init_jump_table @1 total_jumps 2 0 ££MOD_MENU_5 jumps 0 ££MOD_MENU_5 1 ££MOD_MENU_6 2 ££MOD_MENU_5 3 ££MOD_MENU_5 4 ££MOD_MENU_5 5 ££MOD_MENU_5 6 ££MOD_MENU_50872: jump_table_jumps -1 ££MOD_MENU_5 -1 ££MOD_MENU_5 -1 ££MOD_MENU_5 -1 ££MOD_MENU_5 -1 ££MOD_MENU_5 -1 ££MOD_MENU_5 -1 ££MOD_MENU_5 -1 ££MOD_MENU_5 -1 ££MOD_MENU_5:MOD_MENU_5; selected button 'ZCOORD' (1)00D6: if 0 0038: $CORDOFF1 == 1;; integer values004D: jump_if_false ££MOD_MENU_5a 0004: $CORDOFF1 = 0;; integer values 0002: jump ££MOD_MENU_2 :MOD_MENU_5a0004: $CORDOFF1 = 1;; integer values0002: jump ££MOD_MENU_2 :MOD_MENU_6; selected button 'ZCOORD' (2)00D6: if 0 0038: $CORDOFF2 == 1;; integer values004D: jump_if_false ££MOD_MENU_6a 0004: $CORDOFF2 = 0;; integer values 0002: jump ££MOD_MENU_2:MOD_MENU_6a0004: $CORDOFF2 = 1;; integer values0002: jump ££MOD_MENU_2:ON_OFF_100D6: if 0 0038: $CORDOFF1 == 1;; integer values004D: jump_if_false ££ON_OFF_2 05AA: [email protected] = 'FEM_ON';; 8-byte strings0002: jump ££ON_OFF_3 :ON_OFF_205AA: [email protected] = 'FEM_OFF';; 8-byte strings0051: return:ON_OFF_300D6: if 0 0038: $CORDOFF2 == 1;; integer values004D: jump_if_false ££ON_OFF_4 05AA: [email protected] = 'FEM_ON';; 8-byte strings0051: return:ON_OFF_405AA: [email protected] = 'FEM_OFF';; 8-byte strings0051: return My problem is in the "ON_OFF_" [email protected] seems to display right all the time, but [email protected] displays wrong if [email protected] $CORDOFF1 = 1. It might be my jumps. Not sure though. Any help would be appreciated. Thanks. EDIT: shortly after posting, I figured it out. I didn't need the "0051: return" in "ON_OFF_2". I just couldn't see it at first. This code works fine. Any insight would be appreciated though.. Edited June 10, 2006 by ReeferSmoke Link to comment Share on other sites More sharing options...
random_download Posted June 10, 2006 Share Posted June 10, 2006 If you go line-by-line through your code as if you were the game engine, you will often find the error(s) in it: :ON_OFF_100D6: if 00038: $CORDOFF1 == 1;; integer values <--- if this is false004D: jump_if_false ££ON_OFF_2 <--- go here05AA: [email protected] = 'FEM_ON';; 8-byte strings0002: jump ££ON_OFF_3:ON_OFF_2 <--- then here05AA: [email protected] = 'FEM_OFF';; 8-byte strings <--- [email protected] is correct0051: return <--- then we return without setting [email protected] If we removed this line:ON_OFF_3 <--- we end up here00D6: if 00038: $CORDOFF2 == 1;; integer values004D: jump_if_false ££ON_OFF_405AA: [email protected] = 'FEM_ON';; 8-byte strings <--- and [email protected] is set to on0051: return:ON_OFF_405AA: [email protected] = 'FEM_OFF';; 8-byte strings <--- or off0051: return Link to comment Share on other sites More sharing options...
ReeferSmoke Posted June 11, 2006 Author Share Posted June 11, 2006 Thanks for the reply Random. I see that just a minute after your post, I posted my edit.. Thanks again though. 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