KKLua Class Reference
Inherits from | NSObject |
Declared in | KKLua.h |
Class Methods
doFile:
Runs the Lua script file. File is a filename with or without path to the file, and with extension. Returns YES if the execution was successful and NO if it failed. Note that this is different from Lua, where a return value of 0 indicates success and 1 or higher indicates an error. But YES == success is more natural for Objective-C programmers.
+ (BOOL)doFile:(NSString *)aFile
Parameters
- aFile
The full path to a Lua script file.
Return Value
YES if the file was found and the script was executed without errors.
Declared In
KKLua.h
doString:
Runs the Lua code passed in as string. Returns YES if the execution was successful and NO if it failed. Note that this is different from Lua, where a return value of 0 indicates success and 1 or higher indicates an error. But YES == success is more natural for Objective-C programmers.
+ (BOOL)doString:(NSString *)aString
Parameters
- aString
A Lua script as string.
Return Value
YES if the string was executed without errors.
Declared In
KKLua.h
logLuaError
Logs the most recent Lua error by getting the error message string from the stack index -1 and displaying it.
+ (void)logLuaError
Declared In
KKLua.h
logLuaErrorWithMessage:
Logs a Lua error with a custom message.
+ (void)logLuaErrorWithMessage:(NSString *)aMessage
Parameters
- aMessage
The custom message to append to the log.
Declared In
KKLua.h