Bots and Simulations > DNA - General

Defvars with same name as sysvars

(1/1)

abyaly:
I see in Blue on Blue that Jez defined a variable aimright, which can be used the same way as aimdx. When you define a variable that way, what happens? Are you no longer able to access the sysvar by its name? Or does it just not work?

Numsgil:
Labels get converted to numbers in the program.  Multiple labels can point to the same number without interfering with one another.

abyaly:

--- Quote from: Numsgil ---Labels get converted to numbers in the program.  Multiple labels can point to the same number without interfering with one another.
--- End quote ---
The issue isnt with multiple labels pointing to the same numer. There is one label that is being assigned to more than one number.

Numsgil:
Oh, I see now.  I don't think there's anything in the source code to specifically check for it.  Either one or the other will get preference, but which one depends on how the parser checks labels.  My guess is that the sysvar will take precedence and the def in the DNA will be obsoleted.

Navigation

[0] Message Index

Go to full version