Invalid levels given returns an error instead.
This commit is contained in:
parent
0db3d0bf12
commit
591c2845ac
@ -22,8 +22,8 @@ public class LevelUpCommand : CommandGroup
|
||||
var amount = 1;
|
||||
|
||||
if (@params != null)
|
||||
if (!int.TryParse(@params[0], out amount))
|
||||
amount = 1;
|
||||
if (!int.TryParse(@params[0], out amount) || amount < 1)
|
||||
return "Invalid amount of levels.";
|
||||
|
||||
for (var i = 0; i < amount; i++)
|
||||
if (player.Level >= 70)
|
||||
|
||||
Loading…
Reference in New Issue
user.block.title