Coordinates script not working

I googled, found “Vanilla” and “Classic” blogs that all share this same script, but it’s not working in Classic. Every says it should work.

/script SetMapToCurrentZone() local x,y=GetPlayerMapPosition(“player”) DEFAULT_CHAT_FRAME:AddMessage(format(“%s, %s: %.1f, %.1f”,GetZoneText(),GetSubZoneText(),x100,y100))