Blockland Forums
Home
Help
Login
Register
Blockland Forums
»
Blockland Forums
»
Modification Help
»
Adding to getSimTime() returns truncated value?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Adding to getSimTime() returns truncated value? (Read 557 times)
PurpleMetro
June 27, 2015, 12:01:51 PM
After the game's simtime has progressed long enough, it seems that adding or subtracting any sort of value to it returns a truncated string like
1.61372e+006
instead of the actual number. How can I get the actual number instead of that?
Ad Bot
Advertisement
portify
June 27, 2015, 12:04:40 PM
Either use
(getSimTime() + value) | 0
or use
$Sim::Time
instead as you'll have 1000x the time to work with.
Advanced Bot
June 27, 2015, 12:16:03 PM
Doesn't mCeil get rid of the e+blah?
Ipquarx
June 27, 2015, 12:18:14 PM
Quote from: Advanced Bot on June 27, 2015, 12:16:03 PM
Doesn't mCeil get rid of the e+blah?
Not as far as I know... the best way to do it is definitely
(value)|0
Headcrab Zombie
June 27, 2015, 12:20:28 PM
Yeah just use $Sim::Time instead unless you actually need MS
Print
Pages: [
1
]
« previous
next »
Blockland Forums
»
Blockland Forums
»
Modification Help
»
Adding to getSimTime() returns truncated value?