Having more problems
Why does it tell SendMessage is a nil value?
I tested with a simple command that sends you a message and you need to use split in the function, but in my command if I use Split then Entity is a nil value and I cant get chunk pos
Code:
function HandleClaimChunkCommand( Player, Entity )
ChunksIni = cIniFile( "chunks.ini")
ChunksIni:ReadFile()
if (ChunksIni:FindKey(Entity:GetChunkX() .. ":" .. Entity:GetChunkZ())<0) then
ChunksIni:AddKeyName(Entity:GetChunkX() .. ":" .. Entity:GetChunkZ())
ChunksIni:SetValue(Entity:GetChunkX() .. ":" .. Entity:GetChunkZ(), "Claimed", 1)
ChunksIni:WriteFile()
else
Player:SendMessage("This chunk is already claimed")
return true
end
return true
end
I tested with a simple command that sends you a message and you need to use split in the function, but in my command if I use Split then Entity is a nil value and I cant get chunk pos