Here is a batch of code that keeps giving me various compile errors no matter how I try to correct or arrange it. Certainly could use some help. It’s driving me crazy!
/* Room0001: The Actor Starts Game Here. **************************************/
Beach : OutdoorRoom 'At The Beach' 'At The Beach'
roomFirstDesc()
{ "This is first description.";
}
shortDesc = "You are at the sandy beach.";
/* Add HELP sign to beach. ****************************************************/
class Sign : Readable
;
+sign: Sign, Fixture 'large metal sign' 'metal sign'
"The sizeable metal sign is firmly attached to a tree near the start of the
eastern path. It is quite rusty and worn but the printing on it can still be
read. It just might provide some information about The Magic Forest."
initSpecialDesc = "Attached to a tree at the beginning of the eastern path is
is a large metal sign."
cannotTakeMSG = 'Sorry, but it is very rigidly attached to the tree. Besides,
there is no reason to take it with you.'
readDesc = "The sign is written in both English and Spanish and it reads:
'DANGER! Restricted property beyond this point. Enter at your own risk.'\b
Property Manager,\b
Melenkurian\b"
dobjFor(Read)
{
action()
{
readsignAchievement.awardPointsOnce();
inherited;
}
}
readsignAchievement : Achievement { +5 "reading the sign at the beach" }
;
/* Add wooden box to beach. ***************************************************/
+box: ComplexContainer, Fixture 'large slatted wooden (wood) box*boxes' 'large
slatted-wood box'
"The large wooden box, left here from a precious helicopter flight, lies on
some small rocks. At its top, there is a metal hasp that can be turned to
unlock or lock the box."
cannotTakeMsg = (backpack.seen ? 'The backpack would be a more convenient
container. You would be better off using that instead.' : 'The box is much too
heavy to lift or carry around.')
initSpecialMsg = "A large slatted-wood box is lying nearby on some small
rocks."
subContainer: ComplexComponent, LockableContainer
{
currentlyLockedMsg = 'The hasp is currently at the locked position. '
currentlyUnlockedMsg = 'The hasp is currently at the unlocked position. '
dobjFor(Lock)
{
action()
{
"You twist the hasp and lock the box shut.";
inherited;
}
}
dobjFor(Unlock)
{
action()
{
"You turn the hasp, allowing the box to be opened.";
inherited;
}
}
;
Component = 'hasp' 'hasp'
"A simple hasp that does the job of unlocking and locking the box."
location = box.subContainer
dobjFor(Turn) { remap = [box.subcontainer.isLocked ? UnlockAction :
LockAction, box.subContainer]}
;
The sign part seems to work o.k.
RonG