|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Apr 11, 2008 5:46 am
Double variables |
How do they start? How do I prevent them?
They seem to be the main reason behind my triggers that work and then mysteriously fail, but I don't know what's perpetuating them. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Apr 11, 2008 8:15 pm |
Lots of things can cause cmud to make a new variable with the name of an existing one. Some of these are bugs, some of them are by design. If you are having a problem with it, you'll probably have to give more details about what is happening.
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Apr 11, 2008 8:28 pm |
One way it can happen is this...
#class one
#var cat black
#class 0
#T- one
#var cat white |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Apr 11, 2008 8:38 pm |
What that means is this.
I created a variable inside the folder named one.
I then disabled the class folder named one.
Finally I attempted to set the variable named cat to white.
Oops! because Cmud could not see the variable named cat already existed it created a new one. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Apr 11, 2008 8:48 pm |
I'm not disabling anything.
I don't know what happens. I put the variables in, the triggers in, they work fine, then suddenly the trigger wont work. I delete the variables, delete the trigger, redo, and voila, it works. |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Apr 11, 2008 9:42 pm |
OK, so are you actually finding two of a variable when this happens?
|
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Apr 11, 2008 10:00 pm |
No, I've just been continuously told that this is probably the reason.
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Fri Apr 11, 2008 10:12 pm |
Alright then, It sounds like it is time to do a little more research on what exactly is happening.
After a trigger stops working have you tried typing #var by itself to see if there are any duplicates?
Someone should have suggested this and probably has but I REALLY don't want to go looking through other threads right now.
You say that this happens quite frequently correct?
While it is still working. Click on the compiled tab of one of your triggers that dies.
Copy the contents of the compiled tab into a text file and save it for later.
The next time that trigger dies go to the compiled tab and compare the two.
In fact try to do this to one of your simpler triggers so that you can paste the results here for us to look at.
Also after the trigger dies add something to it like #say Trigger for X FIRED
Where you put the trigger name or something that will tell you that it is the trigger in question.
If it is an IF that is failing because of a variable then add @Varthatfailed to the end of the #say
These are some of the things that I do when a trigger acts funny. Maybe they will help us discover what is actually going on here! |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
|
|