fix: compatiblity with unpack
and table.unpack
(#155)
In Lua 5.2 the unpack global has been moved to table.unpack To keep compatiblity with 5.1 and newer, choose depending on what's available.
This commit is contained in:

committed by
GitHub

parent
6eb48fa571
commit
ad2123744b
@@ -3543,7 +3543,7 @@ mp.register_script_message('show-menu', function(json)
|
||||
if type(value) == 'string' then
|
||||
mp.command(value)
|
||||
else
|
||||
mp.commandv(table.unpack(value))
|
||||
mp.commandv((unpack or table.unpack)(value))
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user