mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-23 16:43:32 +01:00
Give a better error message when no arg is specified for :volume.
This commit is contained in:
@@ -616,6 +616,7 @@ const Player = Module("player", {
|
|||||||
function (args) {
|
function (args) {
|
||||||
let arg = args[0];
|
let arg = args[0];
|
||||||
|
|
||||||
|
dactyl.assert(arg, "E471: Argument required");
|
||||||
dactyl.assert(/^[+-]?\d+$/.test(arg), "E488: Trailing characters");
|
dactyl.assert(/^[+-]?\d+$/.test(arg), "E488: Trailing characters");
|
||||||
|
|
||||||
let level = parseInt(arg, 10) / 100;
|
let level = parseInt(arg, 10) / 100;
|
||||||
|
|||||||
Reference in New Issue
Block a user