nanakiwurtz Posted February 28, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted February 28, 2013 Is there any chance to upgrade the script engine to support arrays on permanent character variable? (and also maybe in permanent local account too)? I'm sorry if this sounds like a support post, please move this to a proper section if I'm wrong. Thanks! Link to comment Share on other sites More sharing options...
Emistry Posted February 28, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted February 28, 2013 i think the reason they never tried to add it because the array will be stored permanently...and longer and longer...more and more variable is stored...your server will having lag problems and etc... basically i believe it's just same to what annie explain when ppl stored / abused these kind of variable wrongly... Link to comment Share on other sites More sharing options...
nanakiwurtz Posted February 28, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Author Share Posted February 28, 2013 I assume that people has read Annie's post regarding that issue, and still chooses to ignore the warning. For example, they would use a 'set var1,1;' up to 'set var10,1;', then it'll be easier to do with arrays. Yes, I agree with your reply Emistry, people do horrific things to their database, they let their data to stack and becoming too much to handle. What I have in mind is that I might could make a pseudo-array using a permanent character string variable, by using a delimiter string to parse each data into smaller chunks, and I believe by doing so, I don't need to make unnecessary additional permanent char variables. But currently I have no idea about the max limit of the permanent character string variable... Link to comment Share on other sites More sharing options...
Emistry Posted February 28, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted February 28, 2013 trunk/src/common/mmo.h #define GLOBAL_REG_NUM 256 // max permanent character variables per char #define ACCOUNT_REG_NUM 64 // max permanent local account variables per account #define ACCOUNT_REG2_NUM 16 // max permanent global account variables per account 1 Link to comment Share on other sites More sharing options...
nanakiwurtz Posted February 28, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Author Share Posted February 28, 2013 Thanks Emistry for your reply And what about the limit of permanent character string variable, I mean how many letters can it hold in a single variable? Link to comment Share on other sites More sharing options...
Stolao Posted February 28, 2013 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: Sunday at 01:58 PM Share Posted February 28, 2013 max string is 255 1 Link to comment Share on other sites More sharing options...
xazax Posted March 1, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 427 Reputation: 123 Joined: 11/17/11 Last Seen: December 31, 2022 Share Posted March 1, 2013 A better practice to store pernament data in SQL tables. Link to comment Share on other sites More sharing options...
nanakiwurtz Posted March 1, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Author Share Posted March 1, 2013 But all permanent vars are already stored in SQL too, isn't it? "global_reg_value"? Link to comment Share on other sites More sharing options...
Euphy Posted March 1, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted March 1, 2013 Yes, but character data is mass-saved into the database in regular intervals; using a separate database would avoid this. The only real benefit I see to this is having 'getarraysize' for permanent character variables; but at the same time, we don't want to encourage users to use large character arrays. ._. Link to comment Share on other sites More sharing options...
nanakiwurtz Posted March 2, 2013 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Author Share Posted March 2, 2013 Oh it's the 'autosave_time' config on map_athena.conf? It makes sense now, just like what xazax has said and Euphy has confirm this too. From my understanding, a single long var is still counted as a single variable isn't it? Or does the length of it's value will affect the performance in the long run? Link to comment Share on other sites More sharing options...
AnnieRuru Posted March 2, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted March 2, 2013 a single long var is still counted as a single variable isn't it?yesOr does the length of it's value will affect the performance in the long run?no it wont the string length doesn't affect performance its just like counting 10 cars (small) or counting 10 trucks (big) size doesn't matter, only numbers by analysing the way *athena parse mapreg table, array is treated the same as variables I rather don't like getting this implemented Link to comment Share on other sites More sharing options...
Euphy Posted March 4, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted March 4, 2013 We won't be implementing this; it really would not do much good. Thanks for the idea. 1 Link to comment Share on other sites More sharing options...
Recommended Posts