cannotWearMsg displays twice in adv3lite

The drawer in the dresser in Harry’s bedroom contains a bunch of socks. Harry can’t wear a bunch of socks, so the cannotWearMsg says there are too many individual socks to be comfortable…

[code]+++ socks: Thing ‘bunch of socks’
“Dozens of pairs of socks—brown, black, blue, grey, green—mostly in
matched pairs held together by plastic rings filled the
drawer.”

cannotWearMsg = "{the subj harry} thought briefly about it then decided to 
    pass on the idea. \"Too many individual socks to be comfortable,\" he mused. "

;
[/code]

When Harry tries to put on the socks, the actual message displayed is…

…which is the contents of the cannotWearMsg, twice.

Here’s the full code in my test=bed environment…

[code]#charset “us-ascii”

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

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

version = ‘1’
authorEmail = ‘Jerry Ford jerry.o.ford@gmail.com
desc = ‘A test-bed environment for TADS3 development.’
htmlDesc = ‘A test-bed environment for TADS3 development’
;

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

// harry, main character
harry: Actor ‘Harry;;man self’ @harrysBedroom
“”
contType = Carrier
globalParamName = ‘harry’
isFixed = true
isHim = true
isInitState = true
ownsContents = true
person = 3
proper = true
;

// harry’s bedroom
harrysBedroom: Room ‘Bedroom’ ‘bedroom; room’
“The bedroom”
;
// bedroom dresser

  • bedroomDresser: Container ‘dresser’
    "A plain, brown dresser stood against the south wall, opposite the foot of the bed. "
    ;
    ++ bedroomDresserDrawer: OpenableContainer ‘drawer; dresser; drawer’
    “Dresser drawer.”
    ;
    +++ socks: Thing ‘bunch of socks’
    “Dozens of pairs of socks—brown, black, blue, grey, green—mostly in
    matched pairs held together by plastic rings filled the
    drawer.”

    cannotWearMsg = "{the subj harry} thought briefly about it then decided to
    pass on the idea. "Too many individual socks to be comfortable," he mused. "
    ;[/code]

Jerry

+++ socks: Thing 'bunch of socks'
    "Dozens of pairs of socks---brown, black, blue, grey, green---mostly in 
    matched pairs held together by plastic rings filled the
    drawer."
    
    cannotWearMsg = "{the subj harry} thought briefly about it then decided to 
        pass on the idea. \"Too many individual socks to be comfortable,\" he mused. "
;

It looks to me like the problem here is that you’ve defined cannotWearMsg as a double-quoted string, whereas it needs to be a single-quoted string (a double-quoted string is an instruction to display something, whereas a single-quoted string is a piece of textual data, which is what is needed here.

So what you need is something like:

+++ socks: Thing 'bunch of socks'
    "Dozens of pairs of socks---brown, black, blue, grey, green---mostly in 
    matched pairs held together by plastic rings filled the
    drawer."
    
    cannotWearMsg = 'Harry thought briefly about it then decided to 
        pass on the idea. \"Too many individual socks to be comfortable,\" he mused. '
;

There’s not much point in parameterizing {The subj harry} here unless his name may change.