This repository has been archived by the owner on Dec 29, 2024. It is now read-only.
4.2.x
What's Changed
- BREAKING:
LuaAPI.do_file
andLuaAPI.do_string
both had their return types changed fromLuaError
toVariant
. This is to allow for return values. LuaAPI.do_file
andLuaAPI.do_string
both now take an optimal second argument. Which would be an Array of arguments to pass to the script.- Some minor documentation changes
Example usage:
func _ready():
var lua: LuaAPI = LuaAPI.new()
lua.bind_libraries(["base", "table", "string"])
var ret = lua.do_string("""
local a, b = ...
print(a, b)
return a + b
""", [4, 6])
if ret is LuaError:
print("ERROR %d: %s" % [ret.type, ret.message])
return
print(ret)
Module MacOS actions started failing randomly so are sadly not included in this release.