Opens the named file and executes its contents as a Lua chunk. When called without arguments, dofile executes the contents of the standard input (stdin).

dofile (filename)

Parameters Edit

Arguments Edit

string - Name of the file to execute from the "Runes of Magic" directory.

Returns Edit

expression list
explist - Returns all values returned by the chunk. In case of errors, dofile propagates the error to its caller (that is, dofile does not run in protected mode).

Example Edit

-- Assume test.lua is "return GetAccountName(), 1, 2"
x, y, z = dofile("Interface/AddOns/test/test.lua");
-- x is your account name, y is 1, and z is 2

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.