badneko Posted September 18, 2014 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 37 Reputation: 1 Joined: 06/09/14 Last Seen: February 10, 2019 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 ? (.@) 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 Link to comment Share on other sites More sharing options...
Antares Posted September 19, 2014 Group: Members Topic Count: 74 Topics Per Day: 0.02 Content Count: 420 Reputation: 89 Joined: 01/30/12 Last Seen: April 29, 2023 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 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 37 Reputation: 1 Joined: 06/09/14 Last Seen: February 10, 2019 Author Share Posted September 20, 2014 @Antares Roockie Bro Fist ! Thanks dude, but i still doubting about .@ Quote Link to comment Share on other sites More sharing options...
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 badnekoLink to comment
Share on other sites
2 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.