|
Mondor Novice
Joined: 26 Nov 2008 Posts: 33
|
Posted: Tue May 04, 2010 5:17 pm
Duplicate Variable problem - a work around |
This problem has been brought up before. A copy of an existing variable is mysteriously created, messing up gauges and/or program logic.
I have a single package system for playing Imperian. I had continual, but random, problems with a group of variables that were set by an ATCP (telnet 200) trigger capturing Char.Vitals. One or more or sometimes all of these variables were created a second time at the package root.
I had these variables in the same package but in different classes within that package (and not on the same path to root). My workaround was to move the variables into the same class as the trigger that set them. The problem has not reoccurred since this move with constant playing over the next few weeks.
I have variables in classes throughout the package that are set outside that class that have never been duplicated. ONLY those set as the result of the this ATCP trigger firing were affected. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue May 04, 2010 7:25 pm |
Can you give me more details on your class structure so I can see exactly where the original variables existed compared to where the ATCP trigger was?
Sounds like the context for ATCP triggers isn't being set properly, so I'd like to see more details to try and track this down. Especially since I plan to add ATCP2 (GMCP, whatever) to CMUD soon so more people will end up running into this potential problem. |
|
|
|
Mondor Novice
Joined: 26 Nov 2008 Posts: 33
|
Posted: Tue May 04, 2010 7:36 pm |
Code: |
IMPERIAN
|
|
STATUS
| |
| |
| VARIABLES Actually, I moved the ATCP trigger to this class as opposed to moving the variables to the class containing the trigger
| cur_health
| etc
|
SYSTEM
ATCP trigger USED to reside in this class or one of its subclasses |
As mention previously, I've got variables buried in many class trees that are updated in other class structures...they are updated fine |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue May 04, 2010 9:57 pm |
OK, and I'm assuming that the STATUS and VARIABLES classes were never ever disabled, right?
Also, do you have any other Windows (capture windows, etc), or is IMPERIAN your only Window object? |
|
|
|
Mondor Novice
Joined: 26 Nov 2008 Posts: 33
|
Posted: Tue May 04, 2010 10:01 pm |
Correct. STATUS and VARIABLES are never disabled. I've recently added a TELLS window, but had this problem before I did and no problems after my workaround with that other window
Just an observation...I reported a problem with CMUD freezing when just moving to a room...again randomly...I mention this because I use ATCP for Room.Name, Num and Exits. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue May 04, 2010 10:34 pm |
Were you aware that CMUD already handles the Room.Name, Room.Num and Room.Exits ATCP commands itself internally? You don't need any special triggers to have ATCP work with the CMUD mapper. I'd need to see your exact scripts, but it's possible that your own handling of those ATCP messages was somehow interfering with the built-in mapper handling.
|
|
|
|
Mondor Novice
Joined: 26 Nov 2008 Posts: 33
|
Posted: Tue May 04, 2010 10:37 pm |
I was not aware, sir. Thanks. I was setting #tag name, #tag exit, and #tag vnum with the three triggers. I'll stop doing that.
|
|
|
|
|
|