Tag scripts not executing on valuechanged

Im having issues attempting to get this tag script to execute properly and write the current value to the last value tag, is it simply that this verison of ignition uses different syntax?

im trying to copy this from the “tag scripting” course on inductive university. Changing the value of the “newtag” string does nothing, i cannot get the script to properly run and move the values to the lastvalue.value.

You have a typo - PreviousValue.value instead of previousValue.value.

Everything is case sensitive in scripting.

1 Like

Hmm still no dice

if currentValue.value != previousValue.value and initialChange == false:
		system.tag.writeblocking (['[default]LastValue'],[previousValue.value])

Nevermind, you were right it was a case sensitive typo on writeBlocking. thanks again.

Corrected code:

if currentValue.value != previousValue.value and initialChange == False:
		system.tag.writeBlocking (['[default]LastValue'],[previousValue.value])