I am trying to set up a scoring mechanism where the player receives points when they drop their treaure at a collection point. The scores are set up in a table but I am struggling to get he syntax correct to lok up the value.
Here is some cutback code:
[code]the collection room is a room. “you can collect points here”.
After dropping something (called the dropped item) in the collection room:
if there is a ptsofthing corresponding to a Nameofthing of [the dropped item] in the Table of treasure:
say “got it”.
Table of treasure
Nameofthing ptsofthing
“gold” 100
“silver” 20
“bronze” 10
“tin” 5[/code]
This fails to compile. I would be going on to use the ptsof thing column to award points - but cut the code back trying to isolate my error.
I’ve tried lots of variation using corresponding to etc - all with no luck - I must be missing something obvious