I've run into an error...
I have these verbs for cat: hug; squeeze AND (separately) pet; hold; fondle
I have these verbs for Aunt Marge: hug; squeeze
I want the pet;hold;fondle verbs to return the same response as the hug;squeeze. Obviously I don't want to pet or fondle or hold my aunt. Ewww...
So, I created two separate verb additions for each object. For the script for the pet;hold;fondle verb, I have used this code: do (this, "hug; squeeze")
But, I get the error message: Error running script: Object reference not set to an instance of an object.
Here is the related code:
<object name="verb usage">
<inherit name="editor_room" />
<alias>verb usage room</alias>
<description><![CDATA[This is a room where you encounter two conflicting verbs. Both the cat and the aunt like to be hugged. You can also 'squeeze aunt'.<br/><br/>However much you dislike cats, you probably should squeeze one though. You can 'fondle cat' (creepy, I know) or you can 'pet cat' - neither of which you would want to do to your aunt, however.<br/><br/>This seems simple, but]]></description>
<object name="cat">
<inherit name="editor_object" />
<look>It's a cat. Ugly.</look>
<snork>You do that to the cat.</snork>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<pet type="script">
do (this, "hug; squeeze")
</pet>
<hug type="script">
msg ("Yuck. Cat hugged. Bleck.")
</hug>
</object>
<object name="Aunt Marge">
<inherit name="editor_object" />
<hug>She enjoys the hug.</hug>
<look>Cuddly Aunt Marge. She loves to be hugged.</look>
<nibnib>Done deal.</nibnib>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
</object>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="namedmale" />
<attr name="pov_look">You're Magoo. A simple being trapped in a test game.</attr>
<alias>Magoo</alias>
<alt type="stringlist">
<value>magoo</value>
<value>player</value>
</alt>
<look type="script">
if (game.pov = Xanadu) {
msg ("Holy moly! That looks exactly like you! To take control of Magoo, just type 'switch to Magoo'.")
}
else {
msg ("You are a simple being trapped in a test game.")
}
</look>
</object>
</object>
<verb>
<property>hug</property>
<pattern>hug; squeeze</pattern>
<defaultexpression>"You can't hug; squeeze " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>pet</property>
<pattern>pet; hold; fondle</pattern>
<defaultexpression>"You can't pet; hold; fondle " + object.article + "."</defaultexpression>
</verb>
I'm sure it's obvious and I'll feel like a dolt for asking but... there it is.