It's a problem? Big array - 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)
+--- Thread: It's a problem? Big array (
/showthread.php?tid=523884)
It's a problem? Big array -
Noliax8 - 04.07.2014
It's a problem?
I'll create my object system, but I'll need infos about each object. Create a array with 15000 size, for each object, or i wanna create a array and using the index 1, 2, 3.
N°1: Bad, but practice
pawn Код:
enum e_v
{
o_SlotWear
};
new Obj[15000 /* X */][e_v];
// I can:
CreateObject(/* obj X */, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 0.0);
N°2: Good, small array, but not practice.
pawn Код:
enum e_v
{
o_objID,
o_SlotWear
};
new Obj[500][e_v];
// I can:
CreateObject(Obj[X][o_objID], 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 0.0);
It's a problem to create a array size 15000, 20000...
Thanks you,
Nlx
Re: It's a problem? Big array -
BroZeus - 04.07.2014
use the small array one the second one
creating big arrays caz big LAG
Re: It's a problem? Big array -
BroZeus - 04.07.2014
Quote:
Originally Posted by [HLF]Southclaw
Since when?
I have 64k+ cell arrays for SIF entities which contain lots of enumerated properties.
But still, go with the second option though. If you're making something that extends/uses SA:MP objects then give that it's own set of IDs rather than using the existing ones from whatever entity you're extending/using.
|
Well it surely increases mem usage of players
and player with low end pc [ like me] have lags in areas with many objects
Re: It's a problem? Big array -
Noliax8 - 04.07.2014
Ok, anyways i'll use the second solution.