-
Notifications
You must be signed in to change notification settings - Fork 0
Examples
Josh edited this page Sep 11, 2022
·
1 revision
To add libraries to your programs, you will have to require SCM first.
local scm = require("./scm")
Then you can load your libraries as follows:
scm:load("testLibrary")
If a library is missing, SCM will try to install it.
Furthermore, SCM can also check nested sub-libraries within the loaded library. To do that, you will have to add a comment before requiring the library. This has the advantage of the libraries still being usable without SCM, as a comment does not interfer with the logic of the script.
--@requires subLibrary
require("./libs/subLibrary")
You can also use libraries hosted on Pastebin. Just attach the Pastebin code at the end of the name, separated by an @
.
--@requires subLibrary@z4VRj21Y
require("./libs/subLibrary")
Anything missing or unclear? Feel free to create an issue.