Package

Tip

This is a Static Class named Package. You can access it’s methods directly with :. It is not possible to initialize or create new instances.

Functions

Returns

Name

Description

Log(string Message)

Logs a message in the console (the proper and Nanos way)

Require(string ScriptFile)

Includes new .lua files

RequirePackage(string PackageName)

Includes other Package in this Package

string

GetName()

Gives the package name

Events

Name

Arguments

Description

Load

Is called as soon as a package is loaded.

Unload

Is called as soon as a package is unloaded.

Examples

-- prints the package name at the "Load" event
Package:on("Load", function()
  print("Load package: " .. Package:GetName())
end)

-- prints the package name at the "Unload" event
Package:on("Unload", function()
  print("Unload package: " .. Package:GetName())
end)