Skip to content

Examples

Josh edited this page Jun 1, 2025 · 2 revisions

Require libraries

SCM Program

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.

Alternatively you can add a comment before requiring the library. This has the advantage of the libraries still being usable without SCM, as a comment does not interfere with the logic of the script.

--@requires subLibrary
require("./libs/subLibrary")

Pastebin

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")
Clone this wiki locally