GetServerPath

From Onset Developer Wiki
Revision as of 16:34, 30 June 2021 by BlueMountains (talk | contribs) (Created page with "{{Info|Function|Server|1.5.0}} {{FuncDescription|Gets the absolute path to the server executable.}} {{FuncSyntax|GetServerPath()}} {{FuncParameters}} {{FuncNoParam}} {{Fun...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
GetServerPath

Type: Function
Context: Server
Introduced: v1.5.0

Description

Gets the absolute path to the server executable.

Syntax

GetServerPath()

Parameters

  • This function has no parameters.

Return Value

  • Returns the absolute path to the server as a string

Example

function OnPackageStart()
    print("Running from directory", GetServerPath())
end
AddEvent("OnPackageStart", OnPackageStart)

See also