2 arguments in same local or same value
#15
(10-03-2013, 05:22 AM)STR_Warrior Wrote: What do you think about the way I store bans in my ReWrite project for the Core. I load them in a table, and create an object with functions to edit/read it. Then I return the object.

That's fine for a few (tens) of items, but not for several hundred or even thousands - that will consume a lot of memory and will become very time-consuming to search for a match.

(10-03-2013, 06:08 PM)tonibm19 Wrote: I noticed my plugin is usseless, because you could break blocks from a protected chunk being out, Is there any way of getting the chunk pos of a coordinates? If no, it would be fine if you make a cWorld:GetChunkXat() and cWorld:GetChunkZat() functions. I made an issue on github

As I've written in the GitHub, response a function for this would be too expensive to call, compared to the simple calculation that you can do directly in Lua. Just use math.floor(BlockX / 16)
Reply
Thanks given by:


Messages In This Thread
RE: 2 arguments in same local or same value - by xoft - 10-03-2013, 10:53 PM



Users browsing this thread: 3 Guest(s)