Author Topic: Sysvars explained.  (Read 3602 times)

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Sysvars explained.
« on: November 10, 2005, 03:46:35 PM »
There have been a number of posts lately which have indicated a possible lack of understanding about the way that the sysvars really work.

Here is the inside scoop.

The sysvars.txt file is nothing more than a list of numbers and names, stored alternately.
The number represents the memory position and the name is simply a label that corresponds to that number.

When DB runs, one of its first tasks is to load the sysvars.txt file and save the labels and addresses in an internal array so that the DNA parser (and a few other select parts of the program) can take the text values from the DNA files and convert them to numerical values that the program can understand.

You can think of the sysvars.txt file as an English to DarwinBots translation dictionary if you like.

In the earlier versions of DB (up to about V2.21 I think), the program uses "sysvars.txt" and has an internal limit of 100 sysvars. If you were to add more than 100 values into the text file then it would crash.
For this reason, when we ran out of space for new sysvars in the newer versions, we had to expand the internal array to 200 and then start using "sysvars2.21.txt"

Any version that uses "sysvars2.21.txt" will run with the latest copy of the file since all it does is to download a list of memory locations.

In other words older DB versions such as 2.21 will run with the latest "sysvars2.21.txt" but newer DB versions like 2.37.5 will have limited workability with older sysvars files. It will run but many of the DNA commands will be non-functional.

In short, you cannot cause the program to crash by using the wrong sysvars version unless you try to run a pre-2.21 version with a sysvars file containing more than 100 locations OR you add more locations to sysvars2.21.txt such that it exceeds 200 locations.

Questions please?
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D