2 arguments in same local or same value
#11
It's the hooks that'll be slow - either you read an entire INI file whenever a player digs / places a block, or you keep all that data in memory (and risk losing it).
This is exactly the kind of situation that you want to use database for.
Reply
Thanks given by:
#12
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.
Reply
Thanks given by:
#13
I dont know how to use SQLite. If i learn I may rewrite storage.
Reply
Thanks given by:
#14
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
Reply
Thanks given by:
#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:




Users browsing this thread: 1 Guest(s)