跳转到主要内容

参数

string
必填
Luau source string to compile. Embedded null bytes after the first null are not preserved.
string
Optional chunk name used for error reporting. Defaults to ”@” when omitted or nil.

返回值

function | nil
Loaded function when compilation and loading succeed, otherwise nil.
string | nil
Load error message when loading fails. Not returned on success.

示例

编译 source text 并处理可能的 compiler error。