oEtG Forum
General Category => General Game Discussion => Topic started by: Chapuz on March 25, 2015, 06:13:26 pm
-
Watching "NaN" makes the game see as it has an error. It's disgusting. Can they be replaced by something more elegant?
(http://i.imgur.com/dIT4Cni.jpg)
-
inactive is what should appear imo.
It's just a matter of making a check for NaN at this point
-
NaNs are your friend. The existential crisis of a number which is not a number will pass
-
It's bad for the non-programmer world
-
I'm okay with them
-
wouldn't
if rank == NaN
{code to print 'inactive' instead of NaN}
do the trick?
A function print_sane(num, str) that takes a numerical value and a default string, checks if num is NaN, prints num as a string if num != NaN and str if num == NaN could be used to treat all instances where a number is to be printed and is expected to be NaN sometimes without it being a bug.
-
Fun fact: NaN == NaN returns false. You must use isNaN
That said, yes, easy fix. But I disagree it's necessary; NaN let's you know that you have a non numerical rank since you don't have a rank
It isn't super newbie unfriendly; if you've never submitted a deck, you won't be shown NaN
-
Fun fact: NaN == NaN returns false.
lol
-
But I disagree it's necessary
95% of the potential pbase doesn't know what "NaN" means, so even if it would look good to make people interpret "your rank is non-numerical" as "you have been kicked out of the arena and are inactive", it does not convey "you have a non-numerical rank" - it conveys "here's some random meaningless jumble of upper and lower case letters somewhere where a number should be". It will appear to the average potential player to be a bug, even if it technically isn't.
-
^ this
Besides, it looks like SUCH an easy fix!
-
https://github.com/serprex/openEtG/commit/a0d22123be5d228efb5130b8772531e2e2050f6d