Alternative way to hold high variable ammounts? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Alternative way to hold high variable ammounts? (
/showthread.php?tid=153090)
Alternative way to hold high variable ammounts? -
MisterTickle - 07.06.2010
Anyone have any idea of how I could hold a large amount of available cells without making the define huge..
Let me show you.
#define MAX_BIZ 1000
#define MAX_BIZITEMS 9999
new BizItemPrice[MAX_BIZ][MAX_BIZITEMS];
Basically, The gamemode compiles huge but I need a large amount of items for businesses since businesses will be holding a custom amount of items per each business, I'm not sure what to do and am a bit confused.
Need some advice.
Re: Alternative way to hold high variable ammounts? -
MadeMan - 07.06.2010
If you really need to store that much information (which I doubt) then the gamemode will be big anyway.
Re: Alternative way to hold high variable ammounts? -
Kyosaur - 07.06.2010
Why does each business need 9999 cells? There is no reason you need that much info for for ONE business.
1000 * 9999 = 9999000 * 4 = 39996000 = ~39mb of ram wasted

.
Re: Alternative way to hold high variable ammounts? -
cessil - 07.06.2010
explain your business system more.