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:


Messages In This Thread
cWorld:DoWithBeaconAt signature mismatch - by nounoursheureux - 06-01-2015, 03:27 AM



Users browsing this thread: 2 Guest(s)