Breaking a Mirror

I am having trouble getting my mirror breaking code to work - perhaps someone here can see where I am messing up. Here is the code I have so far (my verify code is not implemented yet, I just want to get it to fire before I begin to update it to check that the mirror hasn’t already been broken). The code below results in: “Nothing obvious happens.”

mirror: Thing 'mirror/bathroom mirror' 'bathroom mirror'
{
    location = MasterBathroom
    isBroken = nil
    specialDesc = ''

    desc = ""

    dobjFor(Break)
    {
        verify() {}
        action()
        {
            'You break the mirror.';
        }
    }
}

Thanks!

I believe the single quotes around “You break…” should be double quotes.

Haha wow - I could have SWORN I tried both double and single quotes with no success, but you are exactly right thank you so much!

No problem :slight_smile:

Single quotes are used for things that are strings - stuff like

local str1 = 'this is'; local str2 = 'a string'; return str1 + ' ' + str2;
while double quotes are used to actually display messages, like:

myFunction{ "This will print"; }
It takes a little getting used to, but it will eventually all make sense :slight_smile: