badneko Posted September 18, 2014 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 ? (.@) After create a temporary npc vartiable .@, this variable return to 0 , or disappear ? Im trying to avoid the consume of ram in Npc variables, .@ variables are the best options ? --------------------- Second question ! for example if i have .@Apples. Delete this script, in the next boot this .@apples still exist ? Exist as .@apple = 0 or just erased from all existence ? Edited September 18, 2014 by badneko Quote
Antares Posted September 19, 2014 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
badneko Posted September 20, 2014 Author Posted September 20, 2014 @Antares Roockie Bro Fist ! Thanks dude, but i still doubting about .@ Quote
Question
badneko
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 ? (.@)
After create a temporary npc vartiable .@, this variable return to 0 , or disappear ?
Im trying to avoid the consume of ram in Npc variables, .@ variables are the best options ?
---------------------
Second question !
for example if i have .@Apples.
Delete this script, in the next boot this .@apples still exist ?
Exist as .@apple = 0
or just erased from all existence ?
Edited by badneko2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.