1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-23 11:47:39 +00:00

lua 5.2 compatibility (#14)

compatibility update - making a few changes in next commit...
This commit is contained in:
Kan18
2019-07-20 18:19:30 -04:00
committed by kepler155c
parent 9ce61b5d98
commit 09be81be27
8 changed files with 19 additions and 18 deletions

View File

@@ -241,7 +241,7 @@ local function _place(action, indexOrId)
if not state.digPolicy(action) then
state.attackPolicy(action)
end
return unpack(result)
return table.unpack(result)
end)
end
@@ -1024,7 +1024,7 @@ function turtle.run(fn, ...)
synchronized(turtle, function()
turtle.resetState()
s, m = pcall(function() fn(unpack(args)) end)
s, m = pcall(function() fn(table.unpack(args)) end)
turtle.resetState()
if not s and m then
_G.printError(m)