GTA: Modification Area
Would you like to react to this message? Create an account in a few clicks or log in to continue.
GTA: Modification Area

A website for the GTA modding scene

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Big-game starts raising Schneider's profile
Jump to 0 Offset EmptySun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
Jump to 0 Offset EmptyThu Oct 14, 2010 1:03 am by findmy012

» Mission Question
Jump to 0 Offset EmptyThu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
Jump to 0 Offset EmptyThu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
Jump to 0 Offset EmptySat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
Jump to 0 Offset EmptyFri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
Jump to 0 Offset EmptyFri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
Jump to 0 Offset EmptyTue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
Jump to 0 Offset EmptyMon Oct 12, 2009 6:45 am by Adler

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
image

Image

Image

Image

Image

Image

Image

Image

Image

Image

image

Image

steve-m.com

Image


----- Русский -----

Если ваш сайт содержит большую коллекцию SCM/CLEO-скриптов (больше 16), напишите на мой e-mail, и я добавлю его в список. Приветствуются скрипты, которые не встречаются на других сайтах ... Спасибо. ))))


----- English -----

If your website has a big enough collection of SCM/CLEO scripts (more than 16) notify me by e-mail
, and I will add it to the list. The unique scripts are preferable ... Thank you. ))))
Log in

I forgot my password



March 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031

Calendar Calendar


You are not connected. Please login or register

Jump to 0 Offset

Go down  Message [Page 1 of 1]

1Jump to 0 Offset Empty Jump to 0 Offset Fri Mar 06, 2009 9:44 am

gtasbigfoot

gtasbigfoot
Admin

The jump to 0 offset is a bug of the games engine. Which is caused by the engine's error. If you're making an endless loop starting from the very beginning of the script, your script will contain a so-called "ZERO JUMP" for instance here is a example:

Code:

// <script start>

:script_01

wait 0
// <script>
jump @script_01

For instance the jump "script_01" every label there is compiled with a relative offset. So, relative means that this label's position will be calculated from the memory address where a mission or script are located at.

So what is wrong with the script above? What offset? The @script_01 label will have ZERO, as it's linking with the starting point of the script. You can even write jump 0 instead, and it will be compiled same.

The GTA engine processes jumps slightly incorrectly. Come face to a jump 0,
the engine thinks that it's a GLOBAL label, not a LOCAL one. And global labels are processed relatively to the main.scm's starting position, which is 0xA49960 in the games memory. This jump @script_01 actually will lead you to the beginning of the main.scm file, however not your script's beginning. So you will see a buggy-unstable effect of the game restarting it's self.

Solving the problem is very easy, add any opcode(commonly 0000, 0001 or 03A4).

Code:

// <script start>
0000:

:script_01

wait 0
// <script>
jump @script_01

This is now OK, the label will be compiled with offset -2 (0xFFFFFFFE),
negative values are relative by the engine.

Commonly users make this mistake(not putting anything there), if there not aware of this problem in the engine, or they had just forgot, which you will find, may happen quite a lot.

http://gtamodding.com

Back to top  Message [Page 1 of 1]

Similar topics

-

» Jump Tables

Permissions in this forum:
You cannot reply to topics in this forum