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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 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?