[0.69.420 -PUBLIC#1464] Horse Pill Boosting Height X 10

Arexodius

Member
Feb 16, 2022
17
1
38
Ate a horse pill.
Grew 19 meters tall.
I was 75 inches of height, now I'm 752 inches.
Weight went to an impressive 7.2 tonnes and I can carry a whooping 33.8 tonnes.

That's impressive!

But seriously, I think the game tried to increase my height by only 2 inches, and somehow appended it to the end of 75 or something, and then got parsed as 752.
 

Fenoxo

Corrupter of Tainted Space
Staff member
Aug 26, 2015
2,027
651
Mareth
www.fenoxo.com
What bugs me about this (har har), is that the issue seems to be related to javascrypt sometimes thinking the tallness value is a string rather than a number, and using string math for the addition instead of number math.

I have no idea how to figure out what's causing the initial fuckulation, but I'm going to brute force fix it by screaming at Javascript to treat things as numbers every step of the goddamn way.

I mean shit like this:
Code:
pc.tallness = Number(Number(pc.tallness) + Number(1));
 

Arexodius

Member
Feb 16, 2022
17
1
38
Hmmm. Interesting. And very strange.
If I'm not mistaken, javascript doesn't distinguish between data types at all when storing variables (probably stores everything as strings inherently), so that might be a necessary step for all numerical calculations involving variables just to be safe, until javascript decides it wants to properly distinguish numbers from strings.
I might be wrong though.

At least it seems necessary to explicitly tell the engine that the variable is purely numerical so it doesn't accidentally use string concatenation instead of addition.
Even though it shouldn't be necessary...
Seems like javascript is drunk atm.