difference between those

I would like to know the difference between these two things:
pawn Код:
GetPVarInt(playerid, "thename");
SetPVarInt(playerid, "thename", value);
and doing it like this:
pawn Код:
thename[playerid] = value;
//and to get the value you just type it in,like if(thename[playeird] == 2)
is there any difference,and could you explain a little bit about the PVar thingy?and Which method is better to use?

PVars are less efficient than variables, cells, arrays or whatever you want to call them. PVars are cross compatible, meaning if you set a specific PVar within a filterscript you can get that value within another filterscript or even within the gamemode (same goes for setting). Use PVars only for said scenario (if you want a stored value to be accessible within separate scripts while in runtime).


Forum Jump:

Users browsing this thread: 1 Guest(s)