07-27-2013, 10:42 PM
Thanks for the support guys!
Okay, I've hit a problem.
Log tells me: LUA: Plugins/Core/onbreakplaceblock.lua:36: attempt to index global 'g_BlockIsSolid' (a nil value).
Why?
Okay, I've hit a problem.
function OnPlayerPlacingBlock(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ, BlockType) -- Direction is air check if (BlockFace == -1) then return false end if( Player:HasPermission("core.build") == false ) then return true else if Player:HasPermission("core.spawnprotect.bypass") == false then local World = Player:GetWorld() local xcoord = World:GetSpawnX() local ycoord = World:GetSpawnY() local zcoord = World:GetSpawnZ() if not ((BlockX <= (xcoord + PROTECTRADIUS)) and (BlockX >= (xcoord - PROTECTRADIUS))) then return false -- Not in spawn area. end if not ((BlockY <= (ycoord + PROTECTRADIUS)) and (BlockY >= (ycoord - PROTECTRADIUS))) then return false -- Not in spawn area. end if not ((BlockZ <= (zcoord + PROTECTRADIUS)) and (BlockZ >= (zcoord - PROTECTRADIUS))) then return false -- Not in spawn area. end WriteLog(0, X, Y, Z, Player:GetName(), id, meta) if WARNPLAYER then WarnPlayer(Player) end return true else if g_BlockIsSolid[BlockType] then -- ISSUE ISSUE local X = BlockX local Y = BlockY local Z = BlockZ X, Y, Z = AddFaceDirection(X, Y, Z, BlockFace) if (Y >= 256 or Y < 0) then return true end ... AND MORE
Log tells me: LUA: Plugins/Core/onbreakplaceblock.lua:36: attempt to index global 'g_BlockIsSolid' (a nil value).
Why?