[SOLVED] Random item carried by player

Hello, how would I, in Informese, write that I want to have a randomly carried item be dropped?

Also, what’s up with the influx of ppl we had here today? (see attached).

Thanks!
Untitled.jpg

let item be a random thing carried by the player; move item to the location;

Awesome! Thanks!!! :smiley:

Hello, I’m sorry, that code compiles fine but I’m getting this error:

the player in the story does have things in the inventory. Is there some other tweak I’m missing?

Here’s my code that, again, compiles but gives the above error:

instead of going while in Shaky Steps: if the direction is east: if a random chance of 1 in 2 succeeds: say "You are jostled enough to drop one of your items."; let item be a random thing carried by player; move item to Shaky Steps; continue the action; otherwise: continue the action; if the direction is south: if a random chance of 1 in 2 succeeds: say "You are jostled enough to drop one of your items."; let item be a random thing carried by player; move item to Shaky Steps; continue the action; otherwise: continue the action.

edited to add: the game crashes with that error when the random chance succeeds. forgot to mention that.

edited again to add: okay, I figured out that while my player DID have an inventory, everything was either worn or inside something that was worn, hence, he wasn’t “carrying” anything. Any ideas how to work out that contingency? Thanks!

Is your player carrying anything? If they’re not, that could explain the moving nothing problem.

Edit: Have you tried ‘enclosed’ instead of ‘carried’?

Also it appears that wearing is not carrying…so you would have to check that separately.

Edit: Ooops didn’t see your edit.

thanks everyone! it was a simple matter of me adding “if player carries something” in there. THANK YOU! :smiley: :smiley: :smiley: :smiley: :smiley: