In Library 6/10 (and possibly earlier -- I don't know),
library message #2 for the Go action is, by default, "You can't go that way."
However, changing that message by providing a LibraryMessages object does not
change the message for the most obvious case -- going in a direction in which there
is no exit. For example, if the room the player is in does not provide an
n_to property, the command GO NORTH will print "You can't go that way." even if
LibraryMessages specifies some different message. For some bizarre reason, the real location of the message in question is
in the CANTGO__TX constant. (The LibraryMessage in question handles the more
obscure situation in which the player tries to go in a direction where there
is a concealed door.) To fix this and make LibraryMessages work right, the
following changes are required: in English.h, find this line: and change it to: then, in verblibm.h, find the GoSub routine and add the
indicated line: (Note that there are TWO underscores between the L and the M in L__M.) A side-effect of this patch is that you can no longer have separate
messages for the two situations described above (going in a direction with a
concealed door and going in a direction not provided by the room). However,
at least you can change the message. Although this patch has one benefit (ensuring a concealed door is undetectable),
it is not true that the default cant_go message cannot be changed without altering the library.
Inserting ChangeDefault(cant_go,SomeStringConstant)
into Initialise() seems to work.
Although it is not documented in DM4, it was in DM3;
ChangeDefault doesn't work with routines which seems the more fundamental problem. The problem is in the RunRountines() function (called by PrintOrRun() if the thing
to print is a routine); currently this routine is: The statement "if (obj.&prop == 0) rfalse;" is uncorrect.
A better version would be:
About Patches
Issue L61020
"Can't go that way" message
Submitted by: Brendan Barnwell
Appeared in: Library 6/10 or before
Fixed in: Library 6/11
Problem
Solution
Constant CANTGO__TX = "You can't go that way.";
Constant CANTGO__TX = 0;
if (k==0 || j==0)
{ if (i.cant_go ~= 0) PrintOrRun(i, cant_go);
else L__M(##Go,2); ! Add this line
rfalse;
}
Update (by Cedric Knight)
Update (by Giancarlo Niccolai and Cedric Knight)
[ RunRoutines obj prop;
if (obj == thedark
&& prop ~= initial or short_name or description) obj=real_location;
if (obj.&prop == 0) rfalse;
return obj.prop();
];
[ RunRoutines obj prop;
if (obj == thedark
&& prop ~= initial or short_name or description) obj=real_location;
if (obj.&prop == 0 && prop >= 64) rfalse;
return obj.prop();
];
Last updated 17 April 2013.
This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation.
Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.