|
Opoponax Beginner
Joined: 16 Sep 2008 Posts: 20
|
Posted: Thu Oct 09, 2008 7:16 pm
[2.36] %i carrying through nested events bug |
Near as I can tell, when nesting events, it carries the %i value from one event to the other. I have not checked aliases or anything else, I just know about it through my events. I've managed to recreate it and pin it down with tests.
Here's the code that recreates it on mine.
Code: |
#var var Sample1|Sample2|Sample3
#event event1 {#forall {%1} {#if (%ismember( %i, @var)) {#raise event2 var}}}
#event event2 {#forall @{%1} {#echo %i}} |
Now, if I type: #raise event2 var
I get the expected:
Sample1
Sample2
Sample3
But if I type: #raise event1 sample1
Instead of getting the same result, I get
sample1
sample1
sample1 |
|
Last edited by Opoponax on Fri Oct 10, 2008 1:11 pm; edited 1 time in total |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Oct 09, 2008 8:32 pm |
That appears to be a bug that Zugg will have to look at when he gets a chance. Topic titled changed to help draw Zugg's attention.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Opoponax Beginner
Joined: 16 Sep 2008 Posts: 20
|
Posted: Wed Oct 15, 2008 3:09 pm |
Any official word on this, maybe an idea for a workaround?
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Oct 15, 2008 4:28 pm |
I've added it to the bug list, but I don't have a workaround. Perhaps you can explain more about the problem you are trying to solve. There are usually many ways to solve a problem in CMUD.
|
|
|
|
Opoponax Beginner
Joined: 16 Sep 2008 Posts: 20
|
Posted: Wed Oct 15, 2008 5:25 pm |
Trying to think how to explain it...
A trigger fires, and feeds a list of occurrences to an event in string list form. It runs similar to this.
#forall {%1} {
#if (%ismember( %i, @var1)) {#raise event1 param1 param2}
#if (%ismember( %i, @var2)) {#raise event2 param1 param2}
One of the secondary events looks like this. I want it added to the value of a key in string list format. Most string list functions work on database record values in the var.key format, but #additem and #delitem don't want to. To work around this, I use a local variable.
$var=@{%1.key}
#forall {%2} {#additem $var {%i}}
#addkey %1 key $var
Rather then adding the new reaction parameter it adds the occurrence parameter from the first event, which doesn't work since it isn't looked for. |
|
|
|
|
|