mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-24 23:09:10 -05:00
Fix /statcalc with invalid levels
This commit is contained in:
parent
dff9583500
commit
8ed5f1f2ca
|
|
@ -1316,8 +1316,11 @@ export const commands: Chat.ChatCommands = {
|
|||
} else if (lowercase.startsWith('lv') || lowercase.startsWith('level')) {
|
||||
level = parseInt(arg.replace(/\D/g, ''));
|
||||
lvlSet = true;
|
||||
if (isNaN(level)) {
|
||||
return this.sendReplyBox('Invalid value for level: ' + Utils.escapeHTML(arg));
|
||||
}
|
||||
if (level < 1 || level > 9999) {
|
||||
return this.sendReplyBox('Invalid value for level: ' + level);
|
||||
return this.sendReplyBox('Level should be between 1 and 9999.');
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user