custom phrase [or whatever theyre called]

in my game i wanted to make this action called writing.
like to where the player can write a letter i was thinking about adding where you have to send a letter to someone…

i tried this:

writing is an action applying to one thing. understand "write [text] on [something" as writing]
but it gave me an error sayin something about grammar, and one thing.
since i only had one thing…
i tried typing two things but multi things never seem to work either like two things in the script.

i used [text] cause i wanted it to where you can write like anything that will print on the letter
im not sure all of the letter part but im still figuring out that part, but can anyone help me?

Writing is an action applying to one topic and one thing.
Understand "write [text] on [something]" as writing.

Try this as a starting point.

The Library is a room.

A rubber ball is here.

A writeable object is a kind of thing. A writeable object has some text called the message.

A piece of paper is here. The piece of paper is a writeable object.

A writing instrument is a kind of thing. 

The pencil is a writing instrument. The pencil is carried by the player.

vague writing is an action applying to one thing.
Understand "write on [something]" as vague writing.

Instead of vague writing:
	say "Try: write 'something' on [the noun]."

Writing on is an action applying to one topic and one thing.
Understand "write [text] on [something]" as writing on.

Check writing on:
	if the second noun is not a writeable object:
		say "You can't write on [the second noun]." instead;
	if the player does not carry a writing instrument:
		say "You don't have anything to write with." instead.

Carry out writing on:
	now the message of the second noun is the topic understood.
	
Report writing on:
	say "You write [the topic understood] on [the second noun]."

Instead of examining a writeable object (called WO):
	If the message of WO is empty:
		say "[The WO] is blank.";
	otherwise:
		say "It says: [the message of WO].[line break]"

If you just want the player to write a letter as part of your story, you can start them out with a piece of paper, have them issue the command “write letter”, and replace the paper with a “letter to aunt marge” object or whatever. You don’t need to go through the trouble of capturing the specific text that the player writes and displaying it back to them.

At one time I wrote an extension called Notepad that was designed for precisely this type of thing. I doubt it’s compatible with the latest release of I7, but you may be able to fix it up without any major headaches.

Jim’s Notepad extension is here. I haven’t tried it with 6M62 because Snow Leopard, but it works for me with 6L38.

Include Notepad by Jim Aikin.

The Library is a room.

A rubber ball is here. [This is here to be something that you can't write on.]

The player carries a pencil.

A piece of paper is here. The piece of paper is a notepad. The allowed-pens of the piece of paper is {pencil}.

it said it couldnt find it? so i guess didnt work on mine either

but ill try something. i guess :slight_smile:

nevermind,i think i just had it the wrong place on the script editor.