API:loadfile

Returns a compiled file as a function.

Arguments

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

Returns

 * 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.

Related Functions

 * dofile
 * load
 * loadstring
 * RunScript