I don't think it's wrong coords, but rather it's because of rounding. The player position is a floating point value; cWorld:GetHeight() and cWorld:SetBlock() both expect an integral coord, so the Lua glue code must convert it somehow; and I'm pretty sure it's using the wrong kind of conversion.
Also, to make your code more efficient, don't do
Not to mention that you could assign a value directly, because you know how many blocks will be replaced (GetHeight() - y). And why are you even storing the value in a per-player map, if you keep resetting the value with every replacement, anyway?
Please don't derail by posting off-topic stuff. We know it's broken, it's in the bug tracker, and when we've got the time, we'll fix it. There are more pressing issues now, such as the pickups not working etc.
Also, to make your code more efficient, don't do
RemoveAboveBlocks[Player:GetName()] = RemoveAboveBlocks[Player:GetName()] + 1but instead do the calculation on a local variable and then assign the final value to RemoveAboveBlocks[Player:GetName()].
Not to mention that you could assign a value directly, because you know how many blocks will be replaced (GetHeight() - y). And why are you even storing the value in a per-player map, if you keep resetting the value with every replacement, anyway?
(05-19-2013, 09:08 PM)tonibm19 Wrote: Also, ForEachEntity don't work, please fix it.
Please don't derail by posting off-topic stuff. We know it's broken, it's in the bug tracker, and when we've got the time, we'll fix it. There are more pressing issues now, such as the pickups not working etc.