cWorld:DoWithBeaconAt signature mismatch - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: cWorld:DoWithBeaconAt signature mismatch (/thread-1993.html) |
cWorld:DoWithBeaconAt signature mismatch - nounoursheureux - 06-01-2015 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 endThe 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 RE: cWorld:DoWithBeaconAt signature mismatch - xoft - 06-01-2015 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. RE: cWorld:DoWithBeaconAt signature mismatch - nounoursheureux - 06-01-2015 I see that you fixed it ! Thanks |