mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-10 09:20:28 +00:00
Improve error when no path is passed to "speaker"
Co-authored-by: Matthew W <fatboychummy@gmail.com>
This commit is contained in:
parent
777aa34bb0
commit
ae767eb5be
@ -43,6 +43,10 @@ if cmd == "stop" then
|
|||||||
for _, speaker in pairs(get_speakers(name)) do speaker.stop() end
|
for _, speaker in pairs(get_speakers(name)) do speaker.stop() end
|
||||||
elseif cmd == "play" then
|
elseif cmd == "play" then
|
||||||
local _, file, name = ...
|
local _, file, name = ...
|
||||||
|
if not file then
|
||||||
|
error("Usage: speaker play <file or url> [speaker]", 0)
|
||||||
|
end
|
||||||
|
|
||||||
local speaker = get_speakers(name)[1]
|
local speaker = get_speakers(name)[1]
|
||||||
|
|
||||||
local handle, err
|
local handle, err
|
||||||
|
Loading…
Reference in New Issue
Block a user