SA-MP Forums Archive
[Question] PVars limit? - 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: [Question] PVars limit? (/showthread.php?tid=356740)



[Question] PVars limit? - Maxips2 - 04.07.2012

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


Re: [Question] PVars limit? - HuSs3n - 04.07.2012

no, there isnt


Re: [Question] PVars limit? - Stylock - 04.07.2012

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.


Re: [Question] PVars limit? - Maxips2 - 04.07.2012

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


Re: [Question] PVars limit? - iggy1 - 04.07.2012

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



Re: [Question] PVars limit? - Maxips2 - 04.07.2012

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


Re: [Question] PVars limit? - Stylock - 04.07.2012

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