FANDOM


Returns a compiled file as a function.

loadfile (filename)

Parameters Edit

Arguments Edit

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

Returns Edit

function
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.
error
string - If there are no errors, returns nothing; otherwise, returns the error message.

Example Edit

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

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.