Returns a compiled file as a function.

loadfile (filename)

Parameters Edit

Arguments Edit

string - File to be compiled. Path root is the Runes of Magic folder.

Returns Edit

function - If there are no errors, returns the compiled string as a function; otherwise, returns nil. The environment of the returned function is the global environment.
string - If there are no errors, returns nothing; otherwise, returns the error message.

Example Edit

local f = loadfile("Interface/AddOns/foo/bar.lua");

Notes Edit

Related Functions Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.