0

ドキュメントに従って、プレーヤーが開始時に自分の名前を選択できるようにゲームをセットアップしましたが、タイトル ケースに入れるために使用される行が機能しません。ゲームを開始するたびに、プレイヤーの名前が小文字で表示されます。

コード:

The player's forename is an indexed text that varies. The player's full name is an indexed text that varies.

When play begins:
    now the command prompt is "What is your name? > ".;
    no.

To decide whether collecting names:
    if the command prompt is "What is your name? > ", yes;
    no.

After reading a command when collecting names:
    now the player's full name is "[the player's command in title case]";
    now the player's forename is word number 1 in the player's command;
    now the command prompt is "> ";
    say "Thank you, [player's forename].[paragraph break]";
    say "[banner text]";
    move the player to the bed;
    reject the player's command.

そして、これが私がそれから得ているものです:

名前は何?> Squiggle Squiggleson ありがとう、squiggle。

The Children of Tragedy An Interactive Fiction by Luke Tooze リリース 1 / シリアル番号 131216 / Inform 7 build 6G60 (I6/v6.32 lib 6/12N) SD

squiggle の寝室 (ベッドの上) 整えられていないベッドに横たわり、天井を見つめていると、起きて一日を迎える必要があることに気づきます。

私は多くのバリエーションを試しましたが、Inform は毎回それを許可していますが、実際にはケースを変更しません。助けてください?

4

1 に答える 1

1

変数の大文字と小文字を設定しますplayer's full nameが、元の入力 ( ) に基づいてフォアネームを設定しplayer's commandます。after reading a command ルールの 2 行目を次のように変更します。

now the player's forename is word number 1 in the player's full name;
于 2013-12-16T20:38:31.660 に答える