[Question] PVars limit?
#1

Is there any limit to PVars per player or at all?
Reply
#2

no, there isnt
Reply
#3

I ran this code and after 780 iterations, it started printing 0.
pawn Код:
new str[32];
for(new i = 0; i < 800; ++i)
{
    format(str, 32, "PVAR%d", i);
    SetPVarInt(playerid, str, 1);
}
for(new i = 0; i < 800; ++i)
{
    format(str, 32, "PVAR%d", i);
    printf("%d PVAR %d", i, GetPVarInt(playerid, str));
}
781 PVars per player.
Reply
#4

I just tried it myself and it started printing 0 after reaching 800 (799 actually, counting from 0)
Reply
#5

Indeed the limit is 800 per player.

Also this wont work.

pawn Код:
SetPVarInt(1000, "im_not_a_pvar", 1);//max player id is 999 i thinkz (0-999)
GetPVarInt(1000, "im_not_a_pvar");//will return 0
Reply
#6

Well so its confirmed, 800 PVars per-player.
Someone close the thread please.
Reply
#7

I totally forgot that my gamemode was using 19 PVars before I ran that test.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)