SA-MP Forums Archive
Enumerations - 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: Enumerations (/showthread.php?tid=229835)



Enumerations - deather - 22.02.2011

Is there an alternative for enum? because, when I use enum the amx file size increases drastically.

When I compiled my script without using enum idetifier, the size of the amx was 95.3 KB and when I used enum to store strings(only 4 different strings) the size rose to 5.10 MB.


AW: Enumerations - Nero_3D - 22.02.2011

than you did something wrong

the enum statment doesnt use much size at all
It just create constant variables which stores little information

what did you try to do ?


Re: Enumerations - deather - 22.02.2011

Код:
enum dat
{
id,
name[32],
sub[32],
mes[32],
};
new set1[50][MAX_PLAYERS][dat];
new set3[50][MAX_PLAYERS][dat];
new set2[50][MAX_PLAYERS][dat];
in a function...
Код:
format(set1[0][playerid][name], 32, "%s", str1);
format(set1[0][playerid][sub], 32, "%s", str2);
format(set1[0][playerid][mes], 32, "%s", str3);
This is all my enum code. When this is absent the size is small else it is too large.