A yes/no question

The documentation makes this seem simple enough. However!
Source:

After examining the bronze bound book:
	say "You have a bad feeling about this. Like something... sinister... lies under those covers. Are you sure?";
	if the player consents, now the player is in a monster's lair;
	say "You barely manage to read a couple of sentences before the book starts to vibrate and then levitate. You try to close bronze covers with all your might but it's no use. As you grasp the covers, the covers grasp [bold type]YOU![roman type]";
	otherwise say "You leave it alone."

In Example Proposal it says:

    if player consents, now Spruce is handsome;
    otherwise now Spruce is ugly;
    say paragraph break.

I have tried other formulations listed in the example as well. Still, I get:

You wrote ‘otherwise say “You leave it alone.”’ : but this is a phrase which I don’t recognise, possibly because it is one you meant to define but never got round to, or because the wording is wrong

I don’t get it.

Edit: I also tried having if the player consents end with : and ; instead of ,

2 Likes

I think this is a syntax thing that might have gotten decremented - “otherwise” requires a colon and a new line, even if there’s only one line after it, I think. Try this;

After examining the bronze bound book:
	say "You have a bad feeling about this. Like something... sinister... lies under those covers. Are you sure?";
	if the player consents: 
		now the player is in a monster's lair;
		say "You barely manage to read a couple of sentences before the book starts to vibrate and then levitate. You try to close bronze covers with all your might but it's no use. As you grasp the covers, the covers grasp [bold type]YOU![roman type]";
	otherwise:
		say "You leave it alone."
2 Likes

The trick is, there are two formulations here:

if condition, effect;
otherwise effect;
if condition:
    effect 1;
    effect 2;
otherwise:
    effect 1;
    effect 2;

If you want multiple lines of effects, you need to use the second formulation, with the line breaks and the tabs.

4 Likes

Worked! Thanks!

A sidenote to anyone watching. Don’t want to make another thread just for this, but as the prototype’s expanding, I’m getting a bit tired with doing the same actions over and over (I’m turning into a “get” person for crying out loud!) and restore of course fails when the saves were stored on old versions. Is there an easy work-around?

1 Like

There are workarounds allowing you to update a game while allowing saves to continue to work, but they’re a lot of work and generally not viable for a work in progress. Typically the approach is to use the skein and/or implement “test me” commands or other actions to speed through early stages (I do a ton of the former and none of the latter, but I know others swear by them).

2 Likes

Ah, right! I almost forgot I can make multiple test me’s! So I can just put in the steps that will take me to locations I want, and then do the specific actions i’m testing!

1 Like