how to change the name of an object after an action.?

i read the documentation
on this one part on how to change the objects name after a certain action

this is the example i got in it:
After dropping the pot, say “crack”.
now the pot is broken.
now the printed name of the pot is “broken pot”.

and so i edited into the script with another object:

After putting the raw roast on the stove, say “the roast is cooking”
now the printed name of the raw roast is “cooked roast”.

… the first part worked but the name changing part didnt… it keeps saying something about the object being a value??

Semicolons and indentations are important.

After...:
    say "something";
    now...

it still didnt work you can’t use the ; with the say “something”
i dont know why,
it says something about value still aswell at some point

What is your exact code? What is the actual message you’re getting?