19.07.2015, 15:06
(
Последний раз редактировалось DanielCortez; 29.07.2015 в 21:33.
Причина: just realized I have used strval instead of valstr -_-
)
Quote:
I've only tested integers, but here's what I got by allocating 100,000 unique elements:
|
There's no info about that on the wiki, but I've made this test:
pawn Код:
#include <a_samp>
main()
{
static const svar_name_prefix[] = "svar";
new svar_name[sizeof(svar_name_prefix) + 11];
svar_name = svar_name_prefix;
for (new i = 0; i < cellmax; ++i)
{
valstr(svar_name[4], i);
new result = SetSVarInt(svar_name, i);
printf("SVar: %s | Value: %d", svar_name, GetSVarInt(svar_name));
if (0 == result)
{
printf("SVars limit: %d", i);
break;
}
}
}
Код:
SVar: 0 | Value: 0 SVar: 1 | Value: 1 ... SVar: 1999 | Value: 1999 SVar: 2000 | Value: 0 SVars limit: 2000