Difference between revisions of "Talk:Long Integer"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
m (Talk:Variable types: longint moved to Talk:Long Integer)
imported>Kf8Etr
m
Line 1: Line 1:
[[User:DragoonWraith|<font face="Oblivion,Daedric Runes" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 12:45, 15 August 2006 (EDT): I'm having issues with longs that are above 10^8 (or less than -10^8). They '''are''' longs on an object, and so these numbers should work. My math looks something like this:
[[User:DragoonWraith|<font face="Oblivion,Daedric Runes" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 12:45, 15 August 2006 (EDT): I'm having issues with longs that are above 10^8 (or less than -10^8). They '''are''' longs on an object, and so these numbers should work. My math looks something like this:
<pre>        13
<pre>        13
+      2500
      2500
       2513
       2513
+    70000
      70000
       72513
       72513
17000000
  17000000
   17072513
   17072513
+1000000000
1000000000
  1017072517</pre>
  1017072517</pre>
As you can see, when I add the last number in, it changes the last digit for no apparent reason. It does not change it consistently, so I can't just account for the change. I assume this is due to memory issues, but the maximum number I reach is 1326262626 and the minimum is -1326262626, which is well within the limitations written on this page. What gives?
As you can see, when I add the last number in, it changes the last digit for no apparent reason. It does not change it consistently, so I can't just account for the change. I assume this is due to memory issues, but the maximum number I reach is 1326262626 and the minimum is -1326262626, which is well within the limitations written on this page. What gives?

Revision as of 23:19, 11 April 2007

Dragoon Wraith TALK 12:45, 15 August 2006 (EDT): I'm having issues with longs that are above 10^8 (or less than -10^8). They are longs on an object, and so these numbers should work. My math looks something like this:

         13
       2500
       2513
      70000
      72513
   17000000
   17072513
 1000000000
 1017072517

As you can see, when I add the last number in, it changes the last digit for no apparent reason. It does not change it consistently, so I can't just account for the change. I assume this is due to memory issues, but the maximum number I reach is 1326262626 and the minimum is -1326262626, which is well within the limitations written on this page. What gives?

I know that in esm/esp/ess files all variables and gmst's are stored as floats, even if they're defined as integers. Maybe it stores integer script variables as floats in game too, and you're seeing the normal rounding errors suffered by floats? Timeslip 15:11, 15 August 2006 (EDT)
Ignore me. I didn't read the article... Timeslip 15:13, 15 August 2006 (EDT)
Actually, don't ignore me. I just did my own testing, and as far as I can tell longs are stored as floats in object scripts too. Maybe the article is wrong? Timeslip 15:20, 15 August 2006 (EDT)
Dragoon Wraith TALK 22:19, 15 August 2006 (EDT): That was my decision, as well. Well, damn. That sucks. Oh, well, I'll just cut it off at four instead of five. Annoying, but not overly so. Four seems to be perfectly accurate in all situations. I'll change the article.