Enumerations
#1

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.
Reply
#2

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 ?
Reply
#3

Код:
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)