Keep getting errors with randomness!

I keep getting errors with the line The top.type of top is a random top.type

in this code:

top.type is a kind of value. The top.types are shirt, jacket, coat and blouse. A top is in the closet. top has top.type. The top.type of top is a random top.type. The printed name of top is "[top.type]"

Please Help.

Thanks.

What is the error?

Usually, properties assigned at compile-time (i.e. outside of any rules) have to be constants. Try this.

When play begins: now the top.type of the top is a random top.type.