How to use Client tags in scripts

Hi,
I want to use Client tags for the first time but have come up against a problem. If I put this code:

value = system.tag.read(’[Client]SerialScales/weight1’)
system.tag.writeToTag(’[Client]SerialScales/weight2’, value)

in a button (I actually want it in a script) I get the error message “Cannot nest tagValues”.
I am trying to use the client tags as holding places for data so a client script can get values from them and write values back (have client serial scales and need to take 3 weighments before INSERTing into SQL)

this code would work:

value = 289.55
system.tag.writeToTag(’[Client]SerialScales/weight2’, value)

system.tag.read() returns a QualifiedValue object, so you’ll need to get the value out of the QV before you write with it.

qv = system.tag.read('...')
system.tag.write('...', qv.value)

You can also get the quality and timestamp from the QV.