attempt at fixing claim

This commit is contained in:
Anthony Recascino 2016-07-30 17:00:10 -04:00
parent 41c8a64394
commit 2abfd2de59
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ function factionsmod.claim(name,player)
local pos = player:getpos()
local is_owned = factionsmod.testifallowed(pos,nil)
if is_owned ~= true then
table.insert(factionsmod.data.factionsmod[name].chunk[table.getn(chunk) + 1],{})
table.insert(factionsmod.data.factionsmod[name].chunk[#factionsmod.data.factionsmod[name].chunk + 1],{})
factionsmod.data.factionsmod[name].chunk[table.getn(chunk)][0] = math.floor(pos.x/16.0)
factionsmod.data.factionsmod[name].chunk[table.getn(chunk)][1] = math.floor(pos.z/16.0)
end