-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lua script file name should not include version number #17
Comments
Edited: You can ignore this comment, this shows one limitation of using
|
emmm, anyway, using What if the script has options so use this instead: function load_script(script)
mp.command("load-script " .. "~~/scripts/" .. script)
end
-- mpv-scripts
load_script("vendor/occivink/mpv-scripts/scripts/seek-to.lua") So the best practice to load a script is to use |
I have no clue what you are trying to achieve and what you are doing |
Use version number with dot(.) like But now i am using |
You can load the scripts, simply by placing them in the scripts directory. It will automatically use the script. |
Another exampleIf oneself wants to remap the keybinding,
After upgrade Thanks ❤️ |
Renamed version number from scripts |
description
When using
require("SCRIPT_NAME-VERSION")
to load Lua script, it'll first replace versionnumber with "directory separator" in the modname, for example:
require (modname)
document: https://www.lua.org/manual/5.1/manual.html#5.3What's expected?
Strip version number from the script file name, for example,
SmartHistory-1.7.1.lua
should be renamed intoSmartHistory.lua
The text was updated successfully, but these errors were encountered: