Blanking out Random Table Rows

Do you need to specify a specific row in order to blank out the whole row?
or can you choose a random row and then blank it out.
It appears that random rows are not being blanked out when access a row as random.

the Manual is really not too clear on this.

pseudo code below:

choose a random row in the Table of Artifacts
Let A be the type entry
Let B be the location entry
blank out the whole row;
[some code here]
say “[the noun] known as [A] is in [B].”.

Table of Artifacts
type location
mason jar mummy tomb
coffin deeper in the pyramid

if mason jar is chosen it will be chosen agin later when I don’t
want it to be.

That should work. This works, for instance:

[code]Pyramid is a room. The Book of Lies, the jar, and the ankh are in the Pyramid.

Instead of examining the Book of Lies:
unless the Table of Random Things is empty:
choose a random row in the Table of Random things;
say “You read ‘The [artifact entry] is [location entry].’ Then the page vanishes!”;
blank out the whole row;
otherwise:
say “The book is entirely blank.”

Table of Random Things
artifact location
jar “in the tomb”
ankh “deeper in the pyramid”

Test me with “x book/g/g”.[/code]

Can you post more specific code? There’s at least one bug with blanking out items, but it depends on what kind of value you’re blanking out.

Here’s my latest sample code:

I have not checkdd to see if the person has left and THERE IS A BUG
bug when all the rows have NOW been evidently blanked.

there is a man called the thief.
the thief is either arrested or at large.
the thief is at large.

Shopping Mall is a region.
Candy Store, Movie House, and Restaurant are in Shopping Mall.

Candy Store is a room.

a woman called the candy seller is in Candy Store.

Movie House is east of Candy Store.
a man called the ticket taker is in Movie House.

Restaurant is west of Candy Store.

a man called the chef is in Restaurant.

arresting is an action applying to one thing.
understand “arrest [someone]” as arresting.

after arresting the thief:
now the thief is arrested;
say “You arrest the thief.”.

before telling someone in Shopping Mall about “thief”:
if the Thief is arrested:
say “The thief has been arrested.” instead.

instead of telling someone in Shopping Mall about “thief”:
say “There’s a man with a gun running around the Mall. Have you seen him?”;
choose a random row in the Table of Mall Locations;
let P be the place entry;
Let V be the venue entry;
blank out the whole row;
say “[The noun] says: 'I heard that he was spotted [P]. Your next move is to head on over there to check out the report. The [noun] leaves [the holder of the noun] and will come back when the thief is caught.”;
remove the noun from play;
if a random chance of 1 in 10 succeeds:
now the Thief is in V;
otherwise:
remove the thief from play;

Table of Mall Locations
place venue
“in the Candy store” Candy Store
“in front of the Movie House” Movie House
“inside the Restaurant” Restaurant

test me with “tell seller about thief/east /tell taker about thief/w/w/tell chef about thief/
east/ tell seller about thief”.

That seems to work fine for me. The issue with the bug is that you can’t “choose a random row” if all the rows in the table have been blanked out. Before you choose a row you should check to see if the table is empty – take a look at my code to see how that works.

Also, when you post code on here you should enclose it in “code” tags – after you paste it in, highlight it and click on the “code” button at the top of the window.

OK in the future if I post anything I’ll use the code tags.