Game semi-crash with stats greater than 2 billion

  1. Crash

############################################################################################
ERROR in
action number 1
of Step Event0
for object obj_battlecontroller:

Cannot apply sqrt to negative number.
at gml_Script_diminishing_returns
############################################################################################

stack frame is
gml_Script_diminishing_returns (line 0)
gml_Script_bc_EventGainSpeed
gml_Script_bc_CreatureCast
gml_Script_bc_Turn
gml_Object_obj_battlecontroller_Step_0
3. I kept casting blur and necromatic armor to see how high the stats would go. The game threw up this message after adding to either a total of greater than 4 billion or adding more than a billion twice to speed.
After pressing ignore the game added zero to speed and continued as normal.

Windows 10
5.
1.1.0
6. I thought stats could go over 2-4 billion.

2.14 billion is the maximum for some numbers

Yeah I figured that was the case. I thought big numbers were supported across the whole game like huge exp values.

it’s probably 2.14 billion for exp too, I think only the total amount of exp has the really huge numbers (wait, is that what you meant?)

Well we should be good till around creature/mage level 53.5 million then.
(2.14B - 20) / 40 = 53.5M

This crash is actually just due to a bug I think. Numbers can go way above 2.14 billion unless I missed one somewhere.

The largets value of a 32 bit signed integer is 2.14 billion when you go over that number it becomes negative which is what it happening here.

2^31 plus 1 bit as a flag for negative/positive is 32
bits.

The other.larger numbers most not be signed 32 bit ints.

The game still cannot handle stats or maybe stat gains greater than ~2.1 billion.
This gets in the way when fighting nether shaklers using stat buffing to stay alive.
Game version 1.1.1