You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using table of callback functions, the lua state gets confused and won't execute other functions properly.
Consider the following piece of code:
localWorld=Player:GetWorld()
localCallbacks=
{
OnNextBlock=function(X, Y, Z, BlockType, BlockMeta)
if (BlockType~=E_BLOCK_AIR) thenLOG("World.DoExplosionAt = " ..tostring(World.DoExplosionAt))
World:DoExplosiontAt(2, X, Y, Z, false, esPlugin, nil)
returntrueendWorld:SetBlock(X, Y, Z, E_BLOCK_DIAMOND_BLOCK, 0)
World:QueueSetBlock(X, Y, Z, E_BLOCK_AIR, 0, 30)
end
}
cLineBlockTracer.Trace(World, Callbacks, Start.x, Start.y, Start.z, End.x, End.y, End.z)
It outputs "World.DoExplosionAt = function (0xblablabla)", but yet fails to call the function, saying "attempt to call method 'DoExplosionAt' (a nil value)"
The text was updated successfully, but these errors were encountered:
When using table of callback functions, the lua state gets confused and won't execute other functions properly.
Consider the following piece of code:
It outputs "World.DoExplosionAt = function (0xblablabla)", but yet fails to call the function, saying "attempt to call method 'DoExplosionAt' (a nil value)"
The text was updated successfully, but these errors were encountered: