(adv3)
I have a thing whose name whose changes twice, but the first change can be overriden if the player does a different action.
The thing is initially known as a ‘contraption’, and if examined, is revealed as a ‘piano-organ’, and when played (is a musical instrument) changes again into ‘NPC's piano organ’; of course, if the player does first playing then examining (in the realm of possible, because its nature is obvious), the name will be “downgraded”; I have done the logical coding:
if (name == 'contraption') name = 'piano-organ';
whose works as expected, aside an unexpected and baffling runtime error:
[Runtime error: invalid datatype for bitwise AND operator
]
yes, bitwise AND: I have even resorted to
grep '&' *.t
in my working directory, with no results; besides, I’m sure that I never have coded bitwise AND operator in this WIP, and there’s no stray spaces in the very few pointers.
The full verbatim code of the thing in question is below, under appropriate spoiler space:
piano: Fixture '(very) strange unusual contraption/piano/organ/piano-organ'
'contraption' @ball
desc {
"You're puzzled by that strange contraption, and examining it carefully,
you're surprised in discovering that it is a rather unusual musical
instrument, nonexistant on Earth: is a combination vertical piano and organ.
You wonder how its music sounds.";
if (name == 'contraption') name = 'piano-organ';
}
dobjFor(Play)
{
preCond = []
verify() { }
action() { "You try pressing some keys of the piano-organ, and the
sound from it kicks <i>something</i> inside you, and you start actually
playing it; the music is initially alien to you, but you soon realise that
these elfin pointy ears actually have a much larger gamut of frequencies than
human rounded ears, and you cannot avoid appreciating the marked improvement
in musical enjoyment.\n The piece you're playing is more \"angelical\" than
\"elfin\", and you realise that this instrument is the one played by that
angelical girl, Miryarai.";
name = 'Miyai\'s piano-organ';
initializeVocabWith('Miryarai\'s Miyai\'s piano/organ/piano-organ');
}
}
;
Where came that illogical runtime error ??
TIA and
Best regards from Italy,
dott. Piergiorgio.