adv3lite doubles down with cannotSitStand messages

Harry is an alley. He sees a row of garbage cans next to a fence he needs to get over. He tries to stand on the cans, but there are no lids.

There is a cannotStandOnMsg string defined.

The transcript prints it twice.

Same for cannotSitOnMsg.

Here’s the game transcript of the effort to stand on, and then for good measure, to sit on the cans…

Here’s the code that produced it…

[code]#charset “us-ascii”

#include <tads.h>
#include “advlite.h”

versionInfo: GameID
IFID = ‘243748b1-5310-4916-8436-890e9ccc16fd’
name = ‘test’
byline = ‘by Jerry Ford’
htmlByline = ‘by
Jerry Ford

version = ‘1’
authorEmail = ‘Jerry Ford
desc = ‘Testing adv3lite cannot sit/stand messages’
htmlDesc = ‘Testing adv3lite cannot sit/stand messages.’

gameMain: GameMainDef
/* the initial player character is ‘harry’ */
initialPlayerChar = harry
paraBrksBtwnSubcontents = nil
usePastTense = true

// harry, main character
harry: Actor ‘Harry;;man self’ @alley
globalParamName = ‘harry’
isHim = true
isInitState = true
person = 3
proper = true

alley: Room ‘alley’
“A narrow east/west alley, just wide enough for a small pickup truck to pass
by, with room for garbage cans along the fence, separated the Hernandez compound from the
neighbor house next door. \b
The alley was a deadend. The only way out was west to the Av del Pacifico
and the Hernandez front gate.<.p>”

  • garbageCans: Container ‘row of garbage cans;garbage trash basura;cans’
    “Several battered steel drums stood along side the Hernandez fence under a
    handpainted sign that said Basura. \b
    The cans were stuffed with trash. None of the cans had lids.”

    canStandOnMe = nil
    canSitOnMe =nil
    cannotStandOnMsg = “Without lids, there was no firm platform on which to
    place a foot. Trying to stand on one of the garbage cans would be a
    very messy and unfulfilling event. Maybe not, Harry said.<.p>”
    cannotSitOnMsg = “To sit on a can is to sit in a can when the can has no
    lid. Harry rejected the impluse. <.p>”
    cannotTakeMsg = “The cans were too full of garbage to be carried away. <.p>”

This is because cannotStandOnMsg and cannotSitOnMsg need to be defined as single-quoted strings, not double-quoted strings as you have defined them here. The same applies to cannotTakeMsg (and in general usually applies to any property whose name ends in Msg).

That said, the way you’ve defined the garbageCans object means you’ll never see the cannotTakeMsg since there’s nothing preventing them from being taken. You either need to define isFixed = true on them or add Fixture (or Immovable) to the class list of the garbageCans object.

Also, if you try the command SIT IN CANS you’ll get a response that’s not really compatible with your cannotSitOnMsg. You need to define a custom cannotEnterMsg (also a single-quoted string!) as well.