Vision Client tag value


I am trying to open and close the Slide in screen from the left with the press of same icon
for some reason there is an error when i try to check the value of client tag in the if else statement

Parse error for event handler “mouseClicked” SyntaxError: (“no viable alternative at input ‘SlidescreenLeftVisible’”, (’’, 1, 11, ‘if [client]SlidescreenLeftVisible.Value == 1:\n’))

You need to use the tag read function to get the value of tags - you can’t just use the path as you have done.

val = system.tag.readBlocking(["[client]SlidescreenLeftVisible"])[0].value
if val == 1:
	#do things

You have also not indented the if block correctly - indentations need to be tabs, not just one space.

I would recommend the Inductive University videos on scripting to learn more.