• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Compare Integer/Real above 1,000,000,000

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,657
Hi all.
Ability id's have an integer above 1,000,000,000 starting about 1,093,677,360
(could be a few different)

When I convert that number to a string, the number is displayed properly. But when I compare an integer of 1,000,000,001 to 1,000,000,010. WC3 sais that they are the same.

How can I compare integers of id's to each other properly?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Uhm... Yea sorry. I was wrong.
Real values cannot exceed 1,093,677,312
Just 1k more and I could have used them sooooo good.
Seems like I can use integers though.

I thought about having a real as id instead of an integer so I could be able to set sub-id's as decimal values.
However that won't work for abilities -_-
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
well, reals are IEEE754 - binary32, but they seem to not print correctly above 1,093,677,312. I tried printing 1093677313. as well as 1093677312.1, as well as 50000000000., which are all valid reals, and for the first two it printed 1093677312.000, for third it print -12something.000.

Also it is worth noting that wc3 does not support scientific notation, so maybe they artificially limit the upper bound on reals
 
Status
Not open for further replies.
Top