mirror of
https://github.com/Kiritow/OpenComputerScripts.git
synced 2024-03-22 13:10:46 +08:00
Try to fix runtime errors in libworld
This commit is contained in:
parent
8bc2bd66b6
commit
a73439c722
|
@ -191,6 +191,9 @@ function PasteArea(box,ax,ay,az)
|
||||||
if(debugcard==nil) then
|
if(debugcard==nil) then
|
||||||
error("This program require debug card.")
|
error("This program require debug card.")
|
||||||
end
|
end
|
||||||
|
if(computer.getArchitecture()~="Lua 5.2") then
|
||||||
|
print("Warning: Without Lua 5.2 architecture, NBT may cause fatal error.")
|
||||||
|
end
|
||||||
|
|
||||||
local cnt=0
|
local cnt=0
|
||||||
local world=debugcard.getWorld()
|
local world=debugcard.getWorld()
|
||||||
|
@ -198,7 +201,7 @@ function PasteArea(box,ax,ay,az)
|
||||||
print("Pasting to (" .. ax+v.x .. "," .. ay+v.y .. "," .. az+v.z .. ")")
|
print("Pasting to (" .. ax+v.x .. "," .. ay+v.y .. "," .. az+v.z .. ")")
|
||||||
world.setBlock(ax+v.x,ay+v.y,az+v.z,v.id,v.meta)
|
world.setBlock(ax+v.x,ay+v.y,az+v.z,v.id,v.meta)
|
||||||
if(v.nbt~=nil) then
|
if(v.nbt~=nil) then
|
||||||
world.setTileNBT(x,y,z,v.nbt)
|
world.setTileNBT(ax+v.x,ay+v.y,az+v.z,v.nbt)
|
||||||
end
|
end
|
||||||
cnt=cnt+1
|
cnt=cnt+1
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user