|
kjaerhus Magician
Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: Tue Jun 15, 2010 4:34 pm
[3.19d] Problems with %additem? |
I just upgraded to 3.19d and found that nothing works anymore. Well, it seems there has been a change to a central function to my scripts. I hope you can help. I have an alias with three named parameters which puts a command (database record) on my command queue (string list). Unfortunately nothing comes on the queue anymore except some times an emty record. Can anyone explain whether there has been a change (and how I now use this functionality) or whether a bug was introduced?
Code: |
<alias name="doContinue" id="1879">
<value>$queueItem = ""
#ADDKEY $queueItem "COMMAND" $command
#ADDKEY $queueItem "HIDEOPTION" $hideOption
#ADDKEY $queueItem "FEEDBACKSTRINGS" $feedbackStrings
#SECTION commandQueueSection {
commandQueue = %additem($queueItem, @commandQueue)
}</value>
<arglist>$command, $hideOption, $feedbackStrings</arglist>
</alias>
|
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 15, 2010 5:14 pm |
If you read the Beta Forum, you'll see that there have been huge low-level changes to string lists and database variables. So yes, there are currently a lot of bugs that we need help tracking down.
In your above script, we need additional context information about how to use that script and what exactly isn't working. I just tried it with the command:
Code: |
docontinue command hide feedback |
and it properly created the commandQueue string list. But we need to see exactly how you are using doContinue and what you are then doing with commandQueue that isn't working. |
|
|
|
kjaerhus Magician
Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: Tue Jun 15, 2010 6:06 pm |
Funny. I tried deleting the setting and run the alias again and it created a new commandQueue. However, if I try executing the same doContinue funtion a few times I will not get the correct result. Either there will be added nothing or a blank line will be added. Try it out.
EDIT: So it seems to be a problem with only existing variables. By the way I have read the change list but I don't see anything that should support this new functionality as being anything but a bug. Unfortunately this one totally ruins my scripts making playing my mud impossible so I hope we can find a quick solution. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 15, 2010 7:14 pm |
Quote: |
However, if I try executing the same doContinue funtion a few times I will not get the correct result. Either there will be added nothing or a blank line will be added. Try it out. |
I did try it out and I still don't see a problem. I added your alias and then did this:
Code: |
docontinue command1 hide1 feedback1
docontinue command2 hide2 feedback2
docontinue command3 hide3 feedback3 |
then I type #VAR to look at the commandQueue and it looks fine. If I do "#SHOW @commandQueue.1" and "#SHOW @commandQueue.2" etc it all works fine.
So like I said above, if you are getting this to fail, please show the EXACT PROCEDURE that you are using to get it to fail.
Quote: |
Unfortunately this one totally ruins my scripts making playing my mud impossible |
Beta versions are all about beta testing and helping to fix bugs and less about playing your mud. You should always have a backup of previous versions to use to play your mud. |
|
|
|
kjaerhus Magician
Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: Tue Jun 15, 2010 7:33 pm |
I came a little closer to the problem. It seems that the problem arises when you use empty input like "" or just not entering all parameters. For some reason it works fine if you enter all paramters but not if one or more is empty.
Try entering the following three times:
Code: |
docontinue command1 hide1 feedback1 |
And it gets really nasty with something like the following:
Code: |
docontinue command1 "" hide1 |
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 15, 2010 8:23 pm |
Confirmed. For other people playing with this, here is a simple test script to show the problem:
Code: |
#unvar commandQueue
$queueItem = ""
#ADDKEY $queueItem "COMMAND" command
#ADDKEY $queueItem "HIDEOPTION" hide
#ADDKEY $queueItem "FEEDBACKSTRINGS" feedbackStrings
commandQueue = %additem($queueItem, @commandQueue)
$queueItem = ""
#ADDKEY $queueItem "COMMAND" command
#ADDKEY $queueItem "HIDEOPTION" ""
#ADDKEY $queueItem "FEEDBACKSTRINGS" feedbackStrings
commandQueue = %additem($queueItem, @commandQueue)
#show %json(@commandQueue) |
It only seems to fail after the first item has been added to @commandQueue. And only if one of the values is empty. Yet another obscure issue, but it's added to the bug list. Thanks for helping to clarify this issue. |
|
|
|
kjaerhus Magician
Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: Tue Jun 15, 2010 8:29 pm |
Zugg wrote: |
Beta versions are all about beta testing and helping to fix bugs and less about playing your mud. You should always have a backup of previous versions to use to play your mud. |
How do I get such backups? I just patch my CMUD when it suggest me to. At other times you say that it's almost mandatory to update as there may be some nasty bugs. Since CMUD has been in beta for so long now since the last public version most people will tell you that you really need to use the beta. So what do you do?
Anyway, if I was not using the beta as my primary I probably wouldn't use it at all as I am a CMUD user because I like to play a mud and not because I like to fiddle with CMUD. If you have any suggestions how to solve this problem or if you come up with a very quick patch this will be appreciated. Otherwise I'd like to hear how to go back to a previous version. Perhaps you could have more than one download on your site? |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Tue Jun 15, 2010 8:44 pm |
Personally, I keep old copies of CMUD setup files on my computer for cases like this. As far as backups, those are automatically generated (and you can see them under your package list in your CMUD folder).
Yes, CMUD has been in beta for so long. It's both a blessing and a curse, though; it's a blessing because it means that we get to see the new features before we have to pay for CMUD again (due to the 2 year agreement/major upgrade). It's a curse because Zugg is perpetually fixing bugs while adding new features at the same time to try to please everyone.
Betas have never been about 'the latest version with new bells and whistles!' but rather 'Okay, this is a test project. Locate bugs, fix them so that when made public, we don't have 200 posts in one day saying 'This is a bug!' from new people.'
Zugg mentioned it in another post: a lot of developers are treating Betas as the best thing to have, and they 'recommend' it over more stable versions, or put some disclaimer like 'You can use the beta, but it may not be fully stable yet.'
Just thoughts and observations.
Charneus |
|
|
|
kjaerhus Magician
Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: Tue Jun 15, 2010 9:09 pm |
Well, if anyone have suggestions I'd like to hear. I really need my command queue to work. A workaround could be useful since there's hardly any prospect in staying with an older beta version and I guess there is no way to tell how fast this will be fixed now Zugg calls it obscure. To me it's not an obscure case anyway as it's how I've made my command queue...
|
|
|
|
GeneralStonewall Magician
Joined: 02 Feb 2004 Posts: 364 Location: USA
|
Posted: Tue Jun 15, 2010 9:19 pm |
Perhaps checking to make sure each variable isn't null, and if it is then don't bother adding it. Like this:
Code: |
$queueItem = ""
#IF (!%null( $command)) {
#ADDKEY $queueItem "COMMAND" $command
}
#IF (!%null( $hideOption)) {
#ADDKEY $queueItem "HIDEOPTION" $hideOption
}
#IF (!%null( $feedbackStrings)) {
#ADDKEY $queueItem "FEEDBACKSTRINGS" $feedbackStrings
}
#SECTION commandQueueSection {
commandQueue = %additem($queueItem, @commandQueue)
} |
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Jun 15, 2010 9:34 pm |
It's getting fixed later today, so don't waste time trying to kludge a workaround.
As far as beta policies, I've had the same policies for 13+ years. And if you don't know how to make backups of your files, then you shouldn't be using beta software. |
|
|
|
kjaerhus Magician
Joined: 18 Dec 2006 Posts: 317 Location: Denmark
|
Posted: Wed Jun 16, 2010 5:07 pm |
Zugg wrote: |
It's getting fixed later today, so don't waste time trying to kludge a workaround. |
Sounds great. Thank you for the fast response.
Zugg wrote: |
As far as beta policies, I've had the same policies for 13+ years. And if you don't know how to make backups of your files, then you shouldn't be using beta software. |
Well, perhaps I should get wiser on that area. Ususally however upgrading does not produce such drastical results... |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jun 16, 2010 7:28 pm |
It helps to come to the Beta Forum and read the release notes to see what kind of changes you are getting into in a new update. It also helps to look at the Version History. When you see a recent "Alpha" release and see that the Beta versions are lettered updates to an Alpha, that's usually an indication that more trouble than normal is in store for you.
But really it just takes a quick look at the Beta Forum to see what's been happening, and that's really something else all Beta Testers should be doing. You should never just "blindly" install a new beta version. |
|
|
|
|
|