Issue resolved.
Was loading the list from the save file, so the list was being changed to an older version.
ID:141203
May 25 2009, 1:06 pm (Edited on May 25 2009, 11:13 pm)
|
|
In response to Pirion
|
|
Yup works fine. Just don't put the list and the const var inside the verb. Why create the list every time they use it?
|
In response to Ruben7
|
|
Actually, there's a benefit in that: the list only exists when it's needed. If you make it global and always exist, it would be sitting there taking resources even if it isn't used. This is a tradeoff between a little bit more resources available (at all times) and a little bit CPU hit (whenever the list is created). Which to use depends on the situation and your priorities. A common example is when you have a list on turfs - you most certainly should NOT have them all always initialized to save the CPU time needed to create them when they're needed. Rather a list should not be initialized if it's needed at the moment, and uninitialized when it becomes unneeded.
|
In response to Kaioken
|
|
However, as people tend to chat quite a lot, and it'll be mostly there anyway, probably a couple of times, one for every mob talking at that given time, it's probably much better to make global :p
For that example, though. |
In response to Mysame
|
|
Mysame wrote:
However, as people tend to chat quite a lot, and it'll be mostly there anyway, Hmm, who knows? The game may be so interesting they don't talk, or maybe they don't need to. Or your spam filter may prevent people from chatting too much as a spamming countermeasure. >:P But yeah, you're probably right, for the usual cases at least. probably a couple of times, one for every mob talking at that given time Well, due to how DM works only one such list will be exist at any given time, but there may indeed be a situation that the list is created, scrapped, then another person quickly talks again and the list is recreated and scrapped again. I'll just note one could always build some sort of caching system for these things that would keep the list in existence for a little longer to see if it's going to be reused, but you probably wouldn't bother with that for something of such a low magnitude such one list of some words. For that example, though. Yeah, it depends on the situation, I just wanted to point out to Ruben that making a X [here, a list] global or preinitialized instead of initializing it when it's needed is not necessarily always the better solution. |
Your code works just fine, outputs the following:
***
**** **** ****
Too much
-The ass @ss @$$ all have spaces either side of them in your code, so until you enter them with the spaces they wouldn't get filtered.