Hi,
I tried R.A.I.F first, but apparently no one there knows what to do about this, because I got no replies.
I’m having a problem in TADS 2. I’m trying to implment a puzzle in
which the player cuts
a curtain of vines, in order to continue down a path. But when I test
it, I get a “I don’t
know how to cut the vines” for just “cut vines” and I get a “I don’t
understand that sentance”
with “cut vines with machete”.
As far as I know, I’m coding it correctly. Does anyone see a problem
with this implamentation?
(I’ve done the verbs, so that’s not the problem).
Code****************************************
island3_jungle_northPath_vines: fixeditem
isCut=nil
sdesc=“vines”
ldesc=“This curtain of vines is twisted, thick, green, and dangerous
looking.”
noun=‘vines’ ‘vine’
adjective=‘curtain’
location=island3_jungle_northPath
verDoCut(Me)=
{
if (self.isCut=true)
{
“It’s already quite butchered, thank you.”;
}
else if (island1_machete.location!=Me)
{
“You don’t have anything to cut it with.”;
}
}
doCut(Me)=
{
“You hack unskillfully away at the vines, feeling adventureous. After
nearly a minute, you come
out the other side, twirling your machete, nearly slicing your foot
off.”;
self.isCut:=true;
return(island3_jungle_northPath_further);
}
ioCutWith (actor, dobj) =
{
if (self.isCut=nil)
{
if (dobj=island1_machete)
{
“You hack unskillfully away at the vines, feeling adventureous.
After nearly a minute, you come
out the other side, twirling your machete, nearly slicing your foot
off.”;
self.isCut:=true;
return(island3_jungle_northPath_further);
}
else
{
“<<dobj.thedesc>> is not exactly the correct tool for the job.”;
}
}
else
{
“The vine curtain is already cut.”;
}
}
;
Code
End*****************
Thanks,
James