stock is_big_map()
Code:
|
Re: stock is_big_map()
The name of this function is not consistent with what it's returning. "is_big_map" implies that it will return a boolean i.e. an answer to the question "Is big map?" (which would be a yes or a no)
Also, multiplying the file size, in bytes, by 0.001/1024 doesn't make any sense. Either you use the definition 1 KB = 1000 bytes or 1 KB = 1024 bytes, not both. It might just make more sense to call it get_map_filesize() and either leave it in bytes or allow for optionally specifying the desired unit: Code:
stock get_map_filesize(unit = 0) |
Re: stock is_big_map()
Thank you for doing that. Here is an example of code that I use is_big_map on for now until it gets cleaned up.
https://forums.alliedmods.net/showthread.php?t=135044 The compass is worth the effort to optimize IMO. Client overflows and server crashes happen on otherwise fascinating work that could be used on larger projects as author hoped. |
Re: stock is_big_map()
Remember we are dealing with MB.
(1047296 * .001) / 1024 = 1.02275 1047296 / 1024 = 1022.75 |
Re: stock is_big_map()
Quote:
Quote:
|
Re: stock is_big_map()
Ditto
|
All times are GMT -4. The time now is 11:04. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.