[i7] Need Advice Creating Delete Email Function Snippet (Computers by Emily Short)


I just need a bit of advice on how to create a small snippet for deleting emails. Delivering emails is already implemented (a function created by the extension Computers by Emily Short). How would I go about that?

I’m trying to create a simple error message that is delivered to the device on taking it, and is deleted when the variable, functioning, is made true.

This is what I’m working with:

Include Computers by Emily Short.

Functioning is a truth state that varies. Functioning is false. [Decides whether SnailMail is functioning]

Cell Phone is a kind of computer.

Cracked Cellular Device is a cell phone. There is a Cracked Cellular Device.

A trackpad is a part of every cell phone.

A keyboard is a part of every cell phone.

Cracked Cellular device runs an email program called SnailMail. SnailMail is privately-named.

The message table of SnailMail is Table of Cellular Device Messages.

	Table of Cellular Device Messages
	topic	message	arrival time	read	answered	description
	"Error"	"ERROR"	-- 	false	false	"SnailMail cannot connect to server. No messages recieved."
After taking Cellular Device:
	if functioning is false:
		deliver "error" to SnailMail;
		continue the action.
To delete (chosen message - text) from (chosen program - an email program):
			[I'm not sure what to implement here];
Every turn:
	if functioning is true:
		delete "error" from SnailMail;
		continue the action.

Thank you for any advice given, I appreciate the help, and this site, immensely.

I have not used Computers before, but assuming that what you really need to do is just to delete the row containing the message from the table, you could do something like this:

To delete (chosen message - text) from (chosen program - an email program):
     choose the row with Messages of chosen message from the Table of Cellular Device Messages;
     blank out the whole row.

Working with tables is covered in chapter 16 of Writing with Inform; the syntax for those two sentences is found in sections 16.5 and 16.10.

Does that help?

1 Like

Yes, thanks so much! I was trying to figure out how to blank the row but I couldn’t find the section, thank you for providing it and an answer. I appreciate it!

Glad to be helpful! (I’m banging my head against a totally different problem right now, so helping solve someone else’s problem is a nice switch.)