Ich implementiere ein Telefon in Inform7 ohne jede Erweiterung.Verschachtelte Wenn-Bedingungen in Inform7
Calling is an action applying to one topic.
Understand "Call [text]" or "[text] call" as calling.
Carry out Calling:
if the topic understood matches "Melissa":
say "You are calling Melissa … 'are you fine?'";
if player consents:
say "good???";
otherwise:
say "I see!";
if the topic understood matches "Dad":
say "Hey boy";
otherwise:
say "beeeeep – [the topic understood] is not answering";
Also wenn ich Dad anrufen, funktioniert das Verfahren. Aber wenn ich Melissa nennen, sie ist die Frage zu beantworten, und wenn der Spieler damit einverstanden, das gesamte Verfahren versagt:
>call melissa
You are calling Melissa … 'are you fine?'
yes
good???
beeeep -
*** Run-time problem P39: Attempt to say a snippet value which is currently invalid: words 2 to 2.
is not answering
>
seine @khelwood das Problem zu sein scheint, dass er die letzte „sonst“, auch wenn die Bedingung „Melisse“ hat läuft abgestimmt ... – 18zehn
Nun, das ist sicherlich der Fall. Wenn du das nicht willst, dann sollte dein 'wenn das Thema verstanden wird, mit 'Dad' übereinstimmen,' sonst wenn ... ' – khelwood