2 arguments in same local or same value - 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: 2 arguments in same local or same value (/thread-1251.html) Pages:
1
2
|
RE: 2 arguments in same local or same value - xoft - 10-03-2013 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. RE: 2 arguments in same local or same value - NiLSPACE - 10-03-2013 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. RE: 2 arguments in same local or same value - tonibm19 - 10-03-2013 I dont know how to use SQLite. If i learn I may rewrite storage. RE: 2 arguments in same local or same value - tonibm19 - 10-03-2013 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 RE: 2 arguments in same local or same value - xoft - 10-03-2013 (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) |