crazzy_boyy Posted September 17, 2010 Share Posted September 17, 2010 Hi, when i compile this code i get an error " A jump to zero offset found." i tried everything i know and with no luck can anyone help me ?! DEFINE OBJECTS 2DEFINE OBJECT SANNY BUILDER 3.04 DEFINE OBJECT F302 // Object number -1DEFINE MISSIONS 0DEFINE EXTERNAL_SCRIPTS 1 // Use -1 in order not to compile AAA scriptDEFINE SCRIPT F302 AT @F302 // 0DEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0{$VERSION 3.1.0027}//-------------MAIN---------------thread 'MAIN' create_thread @F30201F0: set_max_wanted_level_to 0 set_wb_check_to 0 00C0: set_current_time_hours_to 8 minutes_to 0 04E4: unknown_refresh_game_renderer_at 2488.56 -1666.84 Camera.SetAtPos(2488.56, -1666.84, 13.38)$PLAYER_CHAR = Player.Create(#NULL, 2488.56, -1666.84, 13.38)$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)07AF: $PLAYER_GROUP = player $PLAYER_CHAR group Camera.SetBehindPlayerset_weather 0 wait 0 Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso)Player.Build($PLAYER_CHAR)Player.CanMove($PLAYER_CHAR) = Truefade 1 0 select_interior 0 0629: change_integer_stat 181 to 4 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here $DEFAULT_WAIT_TIME = 250 03E6: remove_text_box :MAIN_297wait $DEFAULT_WAIT_TIME 00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes jump @MAIN_297 //-------------External script 0 (F302)---------------:F302thread 'F302'wait 0:F302_12wait 10 if Player.Defined($PLAYER_CHAR)else_jump @F302_12Model.Load(#F302):F302_230wait 0 if andModel.Available(#F302)else_jump @F302_230 $F302 = Object.Create(18810, 158.093, 2503.88, 1203.58)Object.CollisionDetection($F302) = TrueObject.ToggleInMovingList($F302) = TrueObject.PutAt($F302, 158.093, 2503.88, 1203.58)end_thread @F302 Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/ Share on other sites More sharing options...
TheSiggi Posted September 17, 2010 Share Posted September 17, 2010 add a 0000: below the thread 'F302' Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129236 Share on other sites More sharing options...
crazzy_boyy Posted September 17, 2010 Author Share Posted September 17, 2010 add a 0000: below the thread 'F302' Already tried that, the same error comes..... Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129290 Share on other sites More sharing options...
Adler Posted September 17, 2010 Share Posted September 17, 2010 create_thread @F302 is your problem. I don't know how to fix it though since I never toyed with the SCM much. Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129314 Share on other sites More sharing options...
Jerry123 Posted September 18, 2010 Share Posted September 18, 2010 Thread F302 is an External Script! You can't use create_thread on External Scripts! Here is the code with only the thread DEFINE OBJECTS 2 DEFINE OBJECT SANNY BUILDER 3.04 DEFINE OBJECT F302 // Object number -1 DEFINE MISSIONS 0 DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA script DEFINE UNKNOWN_EMPTY_SEGMENT 0 DEFINE UNKNOWN_THREADS_MEMORY 0 {$VERSION 3.1.0027} //-------------MAIN--------------- thread 'MAIN' create_thread @F302 01F0: set_max_wanted_level_to 0 set_wb_check_to 0 00C0: set_current_time_hours_to 8 minutes_to 0 04E4: unknown_refresh_game_renderer_at 2488.56 -1666.84 Camera.SetAtPos(2488.56, -1666.84, 13.38) $PLAYER_CHAR = Player.Create(#NULL, 2488.56, -1666.84, 13.38) $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR) 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group Camera.SetBehindPlayer set_weather 0 wait 0 Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head) Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs) Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes) Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso) Player.Build($PLAYER_CHAR) Player.CanMove($PLAYER_CHAR) = True fade 1 0 select_interior 0 0629: change_integer_stat 181 to 4 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here $DEFAULT_WAIT_TIME = 250 03E6: remove_text_box :MAIN_297 wait $DEFAULT_WAIT_TIME 00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes jump @MAIN_297 :F302 thread 'F302' wait 0 :F302_12 wait 10 if Player.Defined($PLAYER_CHAR) else_jump @F302_12 Model.Load(#F302) :F302_230 wait 0 if and Model.Available(#F302) else_jump @F302_230 $F302 = Object.Create(18810, 158.093, 2503.88, 1203.58) Object.CollisionDetection($F302) = True Object.ToggleInMovingList($F302) = True Object.PutAt($F302, 158.093, 2503.88, 1203.58) end_thread Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129630 Share on other sites More sharing options...
yair1221 Posted September 18, 2010 Share Posted September 18, 2010 i do not believe he is talking about a script, not EXTERNAL script should be more like that: DEFINE OBJECTS 2DEFINE OBJECT SANNY BUILDER 3.04DEFINE OBJECT F302 // Object number -1DEFINE MISSIONS 0DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA scriptDEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0{$VERSION 3.1.0027}//-------------MAIN---------------thread 'MAIN'01F0: set_max_wanted_level_to 0set_wb_check_to 000C0: set_current_time_hours_to 8 minutes_to 004E4: unknown_refresh_game_renderer_at 2488.56 -1666.84Camera.SetAtPos(2488.56, -1666.84, 13.38)$PLAYER_CHAR = Player.Create(#NULL, 2488.56, -1666.84, 13.38)$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)07AF: $PLAYER_GROUP = player $PLAYER_CHAR groupCamera.SetBehindPlayerset_weather 0wait 0Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso)Player.Build($PLAYER_CHAR)Player.CanMove($PLAYER_CHAR) = Truefade 1 0select_interior 00629: change_integer_stat 181 to 4016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 00180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here$DEFAULT_WAIT_TIME = 25003E6: remove_text_boxcreate_thread @F302:MAIN_297wait $DEFAULT_WAIT_TIME00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutesjump @MAIN_297end_threadthread 'F302':F302wait 0wait 10ifPlayer.Defined($PLAYER_CHAR)else_jump @F302Model.Load(#F302):F302_230wait 0ifModel.Available(#F302)else_jump @F302_230$F302 = Object.Create(18810, 158.093, 2503.88, 1203.58)Object.CollisionDetection($F302) = TrueObject.ToggleInMovingList($F302) = TrueObject.PutAt($F302, 158.093, 2503.88, 1203.58)end_thread try that Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129654 Share on other sites More sharing options...
Silent Posted September 18, 2010 Share Posted September 18, 2010 (edited) omg, yair end_threadthread 'F302':F302wait 0wait 10ifPlayer.Defined($PLAYER_CHAR)else_jump @F302Model.Load(#F302) ... Script is 90% good, but you've commited a mistakes in few places: :F302thread 'F302':F302_12wait 0 if Player.Defined($PLAYER_CHAR)else_jump @F302_12Model.Load(#F302):F302_230wait 0 ifModel.Available(#F302)else_jump @F302_230 $F302 = Object.Create(18810, 158.093, 2503.88, 1203.58)Object.CollisionDetection($F302) = TrueObject.ToggleInMovingList($F302) = TrueObject.PutAt($F302, 158.093, 2503.88, 1203.58)end_thread wait 0 was removed, if and was replaced to if, and label name from end_thread opcode was removed. Should work OK now. yair, Deji should hire yeh for CD development - would be completed in 1 day with you*. *100% trashed and unworking, ofc. Edited September 18, 2010 by SilentPL Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129748 Share on other sites More sharing options...
yair1221 Posted September 18, 2010 Share Posted September 18, 2010 the thread 'F302' should be after end_thread and before :F302 the F302_12 is useless so i removed it :F302thread 'F302':F302_12wait 0ifPlayer.Defined($PLAYER_CHAR)else_jump @F302_12Model.Load(#F302):F302_230wait 0ifModel.Available(#F302)else_jump @F302_230$F302 = Object.Create(18810, 158.093, 2503.88, 1203.58)Object.CollisionDetection($F302) = TrueObject.ToggleInMovingList($F302) = TrueObject.PutAt($F302, 158.093, 2503.88, 1203.58)end_thread Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129760 Share on other sites More sharing options...
Silent Posted September 18, 2010 Share Posted September 18, 2010 the thread 'F302'should be after end_thread and before :F302 ? Rockstar always placed thread name straight after called label name, so your theory is wrong Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129773 Share on other sites More sharing options...
yair1221 Posted September 18, 2010 Share Posted September 18, 2010 dunno i always do that and it always works and beside the script i posted in the first time DEFINE OBJECTS 2DEFINE OBJECT SANNY BUILDER 3.04DEFINE OBJECT F302 // Object number -1DEFINE MISSIONS 0DEFINE EXTERNAL_SCRIPTS 0 // Use -1 in order not to compile AAA scriptDEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 0{$VERSION 3.1.0027}//-------------MAIN---------------thread 'MAIN'01F0: set_max_wanted_level_to 0set_wb_check_to 000C0: set_current_time_hours_to 8 minutes_to 004E4: unknown_refresh_game_renderer_at 2488.56 -1666.84Camera.SetAtPos(2488.56, -1666.84, 13.38)$PLAYER_CHAR = Player.Create(#NULL, 2488.56, -1666.84, 13.38)$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)07AF: $PLAYER_GROUP = player $PLAYER_CHAR groupCamera.SetBehindPlayerset_weather 0wait 0Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso)Player.Build($PLAYER_CHAR)Player.CanMove($PLAYER_CHAR) = Truefade 1 0select_interior 00629: change_integer_stat 181 to 4016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 00180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here$DEFAULT_WAIT_TIME = 25003E6: remove_text_boxcreate_thread @F302:MAIN_297wait $DEFAULT_WAIT_TIME00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutesjump @MAIN_297end_threadthread 'F302':F302wait 0wait 10ifPlayer.Defined($PLAYER_CHAR)else_jump @F302Model.Load(#F302):F302_230wait 0ifModel.Available(#F302)else_jump @F302_230$F302 = Object.Create(18810, 158.093, 2503.88, 1203.58)Object.CollisionDetection($F302) = TrueObject.ToggleInMovingList($F302) = TrueObject.PutAt($F302, 158.093, 2503.88, 1203.58)end_thread it worked Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129781 Share on other sites More sharing options...
BnB Posted September 18, 2010 Share Posted September 18, 2010 It works but the thread wont be named! Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129815 Share on other sites More sharing options...
yair1221 Posted September 18, 2010 Share Posted September 18, 2010 it did name it for me i deleted the txt and decompiled again and all of them had their right names FTL_12 and on and on Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129829 Share on other sites More sharing options...
BnB Posted September 18, 2010 Share Posted September 18, 2010 thread 'F302' won't be read by the game engine Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129836 Share on other sites More sharing options...
yair1221 Posted September 18, 2010 Share Posted September 18, 2010 wierd it does for me but anyway i rather not take any chances form now on i will put the thread after the label thanks Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129841 Share on other sites More sharing options...
Silent Posted September 18, 2010 Share Posted September 18, 2010 Thread will work, but thread name won't be injected into memory when script will be loaded. Only Sanny will mark labels as F302. But Sanny decompilation =/= game form of reading threads. Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129850 Share on other sites More sharing options...
crazzy_boyy Posted September 18, 2010 Author Share Posted September 18, 2010 Well it worked for me.... Link to comment https://gtaforums.com/topic/459393-a-jump-to-zero-offset-found/#findComment-1060129902 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