What does GetPvarint/string return by default? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What does GetPvarint/string return by default? (
/showthread.php?tid=176398)
What does GetPvarint/string return by default? -
Memoryz - 13.09.2010
What does GetPVarINT or GetPVarString return if none has been set in the first place?
Re: What does GetPvarint/string return by default? -
Calgon - 13.09.2010
0.
https://sampwiki.blast.hk/wiki/Per-player_variable_system
Quote:
* PVars can be shared/accessed across gamemode scripts and filterscripts, making it easier to modularise your code.
* PVars are automatically deleted when a player leaves the server, meaning you don't have to manually reset variables for the next player who joins.
* No real need for complex enums/player info structures.
* Saves memory by not allocating pawn array elements for playerids which will probably never be used.
* You can easily enumerate and print/store the PVar list. This makes both debugging and player info storage easier.
* Even if a PVar hasn't been created, it still will return a default value of 0.
* PVars can hold very large strings using dynamically allocated memory.
|
Re: What does GetPvarint/string return by default? -
Memoryz - 13.09.2010
Thank-you sir.