Follow our Instagram!
Curious about what we're currently doing about bots? Check out the latest updates from staff in this thread.
Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.

Done /statcalc detecting level NaN

Mathy

nincada november
is a Battle Simulator Administratoris a Programmeris a Member of Senior Staffis a Community Contributor
PS Admin
What type of bug are you reporting? Chat

What is the bug?
/statcalc detects any text starting with "level" or "lvl" as the level number. It filters out any non-digit characters, which leads to the unintended consequence of being able to have Level NaN:
wPuSoHXePhfqS8AxtGyhtw.png

Are you able to replicate it? If so, how?
Type, for example, /statcalc levelfoobar snorlax atk
Just submitted a pull request to fix this: https://www.smogon.com/forums/threads/statcalc-detecting-level-nan.3743957/

Edit: I meant to link the actual pull request not the thread, not sure how that happened: https://github.com/smogon/pokemon-showdown/pull/10354

DaWoblefet edit: I botched a rebase attempting to fix a syntax error in this user's PR, which led to it not getting fixed sooner. Fixed here: https://github.com/smogon/pokemon-showdown/commit/8ed5f1f2ca1173bb4b222bc39bbda1446bfeea0e
Last edited by a moderator:
Back Top