badneko Posted September 18, 2014 Share Posted September 18, 2014 (edited) Its said variable consume ram. But exactly wich ram? every step in the game, or just the first loading of the server (char,map,login) Npc variables are dangerius in big numbers?, how many exactly ? 100-200-300-1000 ? And even temporary variables are problematic ? ([email protected]) After create a temporary npc vartiable [email protected], this variable return to 0 , or disappear ? Im trying to avoid the consume of ram in Npc variables, [email protected] variables are the best options ? --------------------- Second question ! for example if i have [email protected] Delete this script, in the next boot this [email protected] still exist ? Exist as [email protected] = 0 or just erased from all existence ? Edited September 18, 2014 by badneko Quote Link to comment Share on other sites More sharing options...
Antares Posted September 19, 2014 Share Posted September 19, 2014 I'm a rookie, but as I understand, you may use variables freely. They consume very little ram, unless you create them in an infinite loop. http://rathena.org/wiki/Variables#Temporal_vs_Permanent I suggest to always use the lowest possible scope for a variable, eg: If a variable is only used during a calculation in an event (like OnPCKillEvent), and it is not required after, then make it a temporary script variable, but of course if you want to store a quest progress, make it a permanent character variable, and if you want a server-wide setting/progress variable make it a permanent global variable. But the wiki is the best description. Read it and you will understand everything http://rathena.org/wiki/Variables Quote Link to comment Share on other sites More sharing options...
badneko Posted September 20, 2014 Author Share Posted September 20, 2014 @Antares Roockie Bro Fist ! Thanks dude, but i still doubting about [email protected] Quote Link to comment Share on other sites More sharing options...
Its said variable consume ram.
But exactly wich ram?
every step in the game, or just the first loading of the server (char,map,login)
Npc variables are dangerius in big numbers?, how many exactly ? 100-200-300-1000 ?
And even temporary variables are problematic ? ([email protected])
After create a temporary npc vartiable [email protected], this variable return to 0 , or disappear ?
Im trying to avoid the consume of ram in Npc variables, [email protected] variables are the best options ?
---------------------
Second question !
for example if i have [email protected]
Delete this script, in the next boot this [email protected] still exist ?
Exist as [email protected] = 0
or just erased from all existence ?
Edited by badnekoLink to comment
Share on other sites