System.tag.write - Error

Hi,

I have a short script in actionPerformed event for a button that should write a reset alarm OPC tag.
However it doesn’t work and I get this error:
ERROR [ClientTagUtilities-AWT-EventQueue-2] Error writing to tag Senzori PC/PMPC Valea Cerbului/Reset alarme
Bad; unspecified.

The script is:
tagname = event.source.parent.Nume_tag + “/Reset alarme”
system.tag.write(tagname, 1)

Am I missing something?
Any advice please?

Is your tag connected? Can you write something in it manually (using the tag browser)? Do the paths match up (you can get the path of a tag by copying the path and pasting it in some text field)?