Jump to content

A jump to zero offset found.


Recommended Posts

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

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

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

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 by SilentPL

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

 

 

the thread 'F302'

should be after end_thread and before :F302

mercie_blink.gif ?

Rockstar always placed thread name straight after called label name, so your theory is wrong confused.gif

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

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.

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.