Hello guys!
I would like to ask for your assistance. Trying to execute this script but it seems function isWater is not working.
Would be awesome if you could help me solve the issue
Best regards ^^
I would like to ask for your assistance. Trying to execute this script but it seems function isWater is not working.
function isWalkableSnowTile(pos, creature, proj, pz, water)
if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
if isWater(getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid) and water and isOnlySurfTile(getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid) or not isInArray(SnowTile, getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid) or isInArray(BlockProfitItem, getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid) then return false end
if getTopCreature(pos).uid > 0 and creature then return false end
if getTileInfo(pos).protection and pz then return false, true end
local n = not proj and 3 or 2
for i = 0, 255 do
pos.stackpos = i
local tile = getTileThingByPos(pos)
if tile.itemid ~= 0 and not isCreature(tile.uid) then
if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
return false
end
end
end
return true
end
[Error - Action Interface]
data/actions/scripts/../../lib/ps/profession/actions/collect/miner.luanUse
Description:
data/lib/ProfessionBlock.lua:101: attempt to call global 'isWater' (a nil value)
stack traceback:
data/lib/ProfissionBlock.lua:101: in function 'isWalkableSnowTile'
data/lib/ProfissionBlock.lua:119: in function 'getRandomPosSnowTile'
data/lib/ProfissionBlock.lua:120: in function 'getRandomPosSnowTile'
data/lib/ProfissionBlock.lua:120: in function 'getRandomPosSnowTile'
data/lib/ProfissionBlock.lua:120: in function 'getRandomPosSnowTile'
data/lib/ProfissionBlock.lua:120: in function 'getRandomPosSnowTile'
data/lib/ProfissionBlock.lua:120: in function 'getRandomPosSnowTile'
data/lib/ProfissionBlock.lua:120: in function 'getRandomPosSnowTile'
data/lib/ProfissionBlock.lua:120: in function 'getRandomPosSnowTile'
data/lib/ProfissionBlock.lua:120: in function 'getRandomPosSnowTile'
Would be awesome if you could help me solve the issue
Best regards ^^