SA-MP Forums Archive
PVar have a limit? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: PVar have a limit? (/showthread.php?tid=414177)



PVar have a limit? - ATomas - 08.02.2013

Hello,
when i create to many PVars (cca 800). The next create PVars have a value 0. Why ? How much the limit is ?

Exhample:
Код:
for(new s;s<300;s++) AddDialog2DItem(playerid,s,s,"Text",-1);
Код:
public AddDialog2DItem(playerid,itemid,modelindex,text[],listitem)
{
	if(itemid < MAX_DIALOG2D_ITEM)
	{
		new str[32];
		format(str,sizeof(str),"D2D%d_modelindex",itemid);
		SetPVatInt(playerid,str,modelindex);
		format(str,sizeof(str),"D2D%d_listitem",itemid);
		SetPVatInt(playerid,str,listitem);
		format(str,sizeof(str),"D2D%d_text",itemid);
		SetPVarString(playerid,str,text);
		if(itemid > GetPVarInt(playerid,"D2D_count")) SetPVarInt(playerid,"D2D_count",itemid);
	}
	else print("AddDialog2DItem");
	return 1;
}
from the value of 265 PVar is 0


Re: PVar have a limit? - Sergei - 08.02.2013

Limit is around 800 I think. Why the hell would you even want to make so many PVars?


Re: PVar have a limit? - ATomas - 08.02.2013

Quote:
Originally Posted by Sergei
Посмотреть сообщение
Limit is around 800 I think. Why the hell would you even want to make so many PVars?
Because I create a new dialogue script. I do not want to form separately for each ordinary variable. I want it to be versatile.


Re: PVar have a limit? - Tomboeg - 08.02.2013

Quote:
Originally Posted by Sergei
Посмотреть сообщение
Limit is around 800 I think. Why the hell would you even want to make so many PVars?
Something near that yea, and why would you need so many XD


Re: PVar have a limit? - MicroD - 08.02.2013

I really do not have idea what could be a problem. You should use enumators, pretty easy and dynamic.
- Enumators -


Re: PVar have a limit? - MP2 - 08.02.2013

Are you trying to save a sort of array in a pVar? That's just silly. pVars aren't meant for arrays - they're meant for single player variables.


Re: PVar have a limit? - ATomas - 09.02.2013

Quote:
Originally Posted by MP2
Посмотреть сообщение
Are you trying to save a sort of array in a pVar? That's just silly. pVars aren't meant for arrays - they're meant for single player variables.
No I do not want to use array for players so therefore PVar, each player has a different interface box.

Quote:
Originally Posted by MicroD
Посмотреть сообщение
I really do not have idea what could be a problem. You should use enumators, pretty easy and dynamic.
- Enumators -
not solve the problem with the script but PVars