|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sat Dec 22, 2007 4:37 pm
[2.18] Not sure what to call this problem... |
For some reason all of my triggers and such in every class keep showing the variable and alias paths to a single class that isn't even in those modules when I look at compiled code.
Example:
Code: |
0000 STR 'palegreen'
0020 CMD cw (1)
0032 STR 'devotion'
0048 VARID -1 -1
0060 PUSHEXP 0076
0068 JUMP 0116
0076 VARREF @devotion <devotion> (class Tattoos)
0104 INT 600
0112 SUB
0116 CMD math (2)
0128 INT 0
0136 VARASSIGN Equilibrium <Equilibrium> (class Tattoos) |
I have exported and reimported in XML as well. When I first import and check this same trigger it shows (class Achaea). I cannot figure out why this keeps happening. Tattoos is a separate module.
Here is what Tattoos looks like in its entirety.
Code: |
<module name="Tattoos" id="2021">
<uid>{D98275FB-25F0-41F2-B17E-34A1F9EA6D2D}</uid>
<class name="Tattoo" id="2022">
<class name="Tatts" initdisable="true" enabled="false" id="2023">
<trigger priority="18660" regex="true" id="2024">
<pattern>A (\a+) tattoo on the (\a+) (\a+)\.</pattern>
<value>#additem %2%3tatts %1</value>
</trigger>
<trigger priority="18670" regex="true" id="2025">
<pattern>A (\a+) tattoo on the (\a+)\.</pattern>
<value>#ADDITEM %2tatts %1</value>
</trigger>
</class>
<alias name="getinks" id="2026">
<value>$inks=%1
#IF (%iskey( @inks, $inks)) {#EXECUTE %db( @inks, $inks)}</value>
</alias>
<alias name="tatts" id="2027">
<value><![CDATA[#echo %cr
#SAY You have these tattoos:
#SAY {<color lime>Head:</color><color silver> %replace(@headtatts, "|", " - ")</color>}
#SAY {<color lime>Torso:</color><color silver> %replace(@torsotatts,"|"," - ")</color>}
#SAY {<color lime>Left Arm:</color><color silver> %replace(@leftarmtatts, "|", " - ")</color>}
#SAY {<color lime>Right Arm:</color><color silver> %replace(@rightarmtatts, "|", " - ")</color>}
#SAY {<color lime>Left Leg:</color><color silver> %replace(@leftlegtatts, "|", " - ")</color>}
#SAY {<color lime>Right Leg:</color><color silver> %replace(@rightlegtatts, "|", " - ")</color>}]]></value>
</alias>
<alias name="tc" id="2028">
<value>#if (!@paralysis and !@rightarm and !@leftarm and !@webbed and @newday and !@touchcrystal) {#send {touch crystal}}</value>
</alias>
<var name="headtatts" type="StringList" id="2029">tentacle|mindseye</var>
<var name="leftarmtatts" type="StringList" id="2030">moss|moon</var>
<var name="leftlegtatts" type="StringList" id="2031">prism|crystal</var>
<var name="newday" id="2032">1</var>
<var name="rightarmtatts" type="StringList" id="2033">boar|shield</var>
<var name="rightlegtatts" type="StringList" id="2034">web</var>
<var name="torsotatts" type="StringList" id="2035">cloak|tree</var>
<var name="touchcrystal" id="2036">
<value>0</value>
<default>0</default>
</var>
<trigger priority="18680" regex="true" id="2037">
<pattern>^As you touch the crystal tattoo, you feel your wounds melt away\.</pattern>
<value>touchcrystal=1
newday=0
#alarm {+3} {touchcrystal=0}</value>
</trigger>
<trigger priority="18690" regex="true" id="2038">
<pattern>^You have the following tattoos\:</pattern>
<value>tattoocheck
headtatts=%null
torsotatts=%null
leftarmtatts=%null
rightarmtatts=%null
leftlegtatts=%null
rightlegtatts=%null</value>
</trigger>
<trigger priority="18700" regex="true" id="2039">
<pattern>^You touch the crystal tattoo, but nothing happens\.$</pattern>
<value>newday=0</value>
</trigger>
<var name="inks" type="Record" id="2040">web=outr greenink;outr yellowink|ox=outr goldink;outr redink;outr yellowink;outr blueink|cloak=outr 3 blueink|megalith=outr 2 goldink|crystal=outr greenink;outr purpleink;outr yellowink|prism=outr blueink;outr greenink;outr purpleink;outr redink;outr yellowink|moon=outr redink;outr blueink;outr yellowink|shield=outr greenink;outr 2 redink|mindseye=outr greenink;outr 2 blueink|moss=outr redink;outr blueink;outr yellowink|boar=outr redink;outr redink;outr purpleink|starburst=outr blueink;outr goldink;outr greenink;outr purpleink;outr redink;outr yellowink|tree=outr 5 greenink|runeinks=outr 3 yellowink;outr 1 greenink;outr 7 purpleink;outr 2 goldink</var>
<alias name="tattoocheck" id="2041">
<value>#T+ Tattoo/Tatts</value>
</alias>
<trigger priority="20830" regex="true" id="2042">
<pattern>^You gather together the inks that are needed in order to create the \a+ tattoo\.</pattern>
<value>#substitute {Inking of %upper(%1) - Stage 1 of 6}</value>
</trigger>
<trigger priority="20840" regex="true" id="2043">
<pattern>^You gather the dry inks together in one hand, mixing them together into a morass of colour\.</pattern>
<value>#substitute {Inking - Stage 2 of 6}</value>
</trigger>
<trigger priority="20850" regex="true" id="2044">
<pattern>^Raising your hand to your mouth, you begin to gently blow the inks into the air\.</pattern>
<value>#substitute {Inking - Stage 3 of 6}</value>
</trigger>
<trigger priority="20860" regex="true" id="2045">
<pattern>^The ink momentarily swirls above your (?:left arm|left leg|right arm|right leg|torso|head) and then begins to adhere\.</pattern>
<value>#substitute {Inking - Stage 4 of 6}</value>
</trigger>
<trigger priority="20870" regex="true" id="2046">
<pattern>^Concentrating, you force the ink to begin forming into the shape of a \a+\.</pattern>
<value>#substitute {Inking - Stage 5 of 6}</value>
</trigger>
<trigger priority="20880" regex="true" id="2047">
<pattern>^As the (\a+) tattoo's shape is codified, the last of the ink leaves the air, and you pause for a moment to admire your handiwork\.</pattern>
<value>#substitute {Inking of %upper(%1) - Complete!}</value>
</trigger>
</class>
</module> |
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Dec 22, 2007 5:02 pm |
I believe that the (class Whatever) part of the compiled code is the current class (or perhaps module) at the time the search for the variable or alias is performed, not a compiled reference to the class containing the variable or alias. In short, it's not a bug.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Dec 22, 2007 6:01 pm |
The reference to the class is what class was the default at the time the setting was compiled. The compiled version actually holds a direct ID reference to the variable. When the setting is run again the default class is checked against the recorded default class, and if they match then scope searching might be able to be skipped.
It is one of many little caching things done to accelerate the longer scoping checks. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Sat Dec 22, 2007 10:17 pm |
Sorry but this is making no sense to me. Tattoos is not the default, and I didn't touch anything in that class. I'm not sure what you mean. I didn't call anything from that module or anything else.
However, it is the last module listed so maybe that is it? |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|