Max positive value for Variables H2 thru Z2=32,767?
Posted: Sat Oct 17, 2009 8:07 pm
According to the manual :
* A-G and A2-G2 are one-byte values (can be 0-255) while the rest are two-byte values (0-65535).
However, I've run into a bit of a snag while trying to work up experience and leveling mechanics for a set of skills I am working on.
I originally intended on allowing the maximum accumulation of xp in each skill based on the above documented maximum value. As I approached the half-way point in the macro for the first skill I was setting the levels for, the values I entered began to change to negative values.
After a process of elimination I discovered that the switch to negative numbers begins at the value 32,768. When I try to enter a value of 32,768 or higher, up to 65535, the macro changes the value to a negative number. Here are the values and the negatives they are changed to:
32,768 = -32,768
32,769 = -32,767
32,770 = -32,766
... [skipping ahead 10]
32,780 = -32,756
...[skipping ahead 20]
32,800 = 32,736
...[100 more]
32,900 = 32,636
...[100 more]
33,000 = 32,536
...[2000 more]
35,000 = -30,536
...[30,000 more]
65,000 = -536
...[535 more]
65,535 = -1
As you can see it is a consistant progression backwards so that what we have for possible value ranges are:
-32,768...-1
0...32,767
Is this how it is supposed to be?
* A-G and A2-G2 are one-byte values (can be 0-255) while the rest are two-byte values (0-65535).
However, I've run into a bit of a snag while trying to work up experience and leveling mechanics for a set of skills I am working on.
I originally intended on allowing the maximum accumulation of xp in each skill based on the above documented maximum value. As I approached the half-way point in the macro for the first skill I was setting the levels for, the values I entered began to change to negative values.
After a process of elimination I discovered that the switch to negative numbers begins at the value 32,768. When I try to enter a value of 32,768 or higher, up to 65535, the macro changes the value to a negative number. Here are the values and the negatives they are changed to:
32,768 = -32,768
32,769 = -32,767
32,770 = -32,766
... [skipping ahead 10]
32,780 = -32,756
...[skipping ahead 20]
32,800 = 32,736
...[100 more]
32,900 = 32,636
...[100 more]
33,000 = 32,536
...[2000 more]
35,000 = -30,536
...[30,000 more]
65,000 = -536
...[535 more]
65,535 = -1
As you can see it is a consistant progression backwards so that what we have for possible value ranges are:
-32,768...-1
0...32,767
Is this how it is supposed to be?