Chuyển đến nội dung chính

Đối số

string
bắt buộc
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.

Giá trị trả về

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

Ví dụ

Compile source text va xu ly compiler error co the xay ra.