cWorld:DoWithBeaconAt signature mismatch
#1
I wrote this code:
function handleCommand(a_Split,a_Player)
    baseBlock = Vector3i(a_Player:GetPosX()+2,a_Player:GetPosY(),a_Player:GetPosZ() + 2)  
    a_Player:GetWorld():SetBlock(baseBlock.x,baseBlock.y,baseBlock.z,E_BLOCK_BEACON,0)
    a_Player:GetWorld():DoWithBeaconAt(baseBlock.x,baseBlock.y,baseBlock.z,function(beacon)
        LOG("test")
        return true
    end)
    return true
end
The DoWithBeaconAt function throws this error:

error in function 'DoWithBeaconAt'. argument #5 is 'function'; 'number' expected

But the API docs says that this argument is the callback. I don't know if the API docs are outdated or if I did something wrong.
Thanks for your help Smile
Reply
Thanks given by:
#2
That's a bug, sorry for that, I'll have a fix shortly. More functions are affected.

I edited the title of your post, because the forum wouldn't let me post otherwise, saying the title was too long.
Reply
Thanks given by: Aggroblut
#3
I see that you fixed it ! ThanksBig Grin
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)