ID:107770
 
Not a bug
BYOND Version:479
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Firefox 3.6.13
Applies to:Dream Seeker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
When trying to Calculate a number Higher then 1+015 it fails to do the math and result 0
Numbered Steps to Reproduce Problem:
while using the code shown below it tells you that it gives you 0 instead of the actual outcome.
Code Snippet (if applicable) to Reproduce Problem:
mob/proc
Resting()
var/temp //temp var only here for testing
if(src.resting == 0) return
if(src.resting == 1 && src.stamina<src.maxstamina)
world << "[src] [src.stamina] -- [src.maxstamina]"
temp = rand(src.maxstamina/5,src.maxstamina/10)
world << "[temp]"
src.stamina += temp
world << "[src] [src.stamina] -- [src.maxstamina]"


Expected Results:
it to actually calculate the number correctly
Actual Results:
It doesn't it just results into 0
Does the problem occur:
Every time? Or how often? Everytime
In other games?Yes
In other user accounts?Yes
On other computers?Yes

When does the problem NOT occur?
When I change the Code to not deduct a number.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
I haven't tested this since a Player told me about it a couple a days ago, I first thought it was a mistake made by me but its a simple math thing...
Workarounds:
Have it go up by a set number