Re: Inform: player.before = xx doesn't work as expected


10 Sep 1995 16:45:24 GMT

"Sam Hulick" <shulick@guava.ucs.indiana.edu> wrote:
> [ cityRules;
> Attack: "This is a nice town, there's no need for that.";
> rfalse; ! note the rfalse is important now since a routine outside
> ! an object returns true.
> ];

The code above is equivalent to this code:

[ cityRules;
if (sw__var == ##Attack) {
"This is a nice town, there's no need for that.";
rfalse;
}
rtrue;
];

The `rfalse;' is never executed. Try this instead:

[ cityRules;
Attack: "This is a nice town, there's no need for that.";
default: rfalse;
];

--
Gareth Rees