Files
Bubberstation/code
Timberpoes 10f2cbe2c3 Fix ping_update errors when certain operations resolve to scientific notation (#61443)
Sometimes when logging on Campbell, fancy chat fails to load and my non-fancy chat is spammed with the following.

image

In addition, ping fails to update correct on the status tab when this happens.

Hypothesis:
Sometimes world.time can report a number that displays as scientific notation when converted to text.

The following code leads to calling the update_ping verb.
winset(C, null, "command=.update_ping+[world.time+world.tick_lag*TICK_USAGE_REAL/100]")

I suspect what's happening is world.time is being converted to text and you're getting the following command:
command=.update_ping+2.1313e

And this is causing an error in update_ping since it can't resolve 2.1313e as a valid number.

Wrapping that in text2num with 32 significant figures (arbitrary number, heat death of the universe proof by several orders of magnitude) means the update_ping verb always gets a number that isn't in scientific notation.
2021-09-14 19:14:11 -07:00
..
2021-09-14 18:27:47 -07:00
2021-09-14 19:12:53 -07:00
2021-03-31 14:44:52 -04:00