Hell dear,
I got error while configuring scheduled scripting in gateway event script.
Error : syntexError : mismatched input 'paths' expecting INDENT
PFA attached picture of the error and code.
Hell dear,
I got error while configuring scheduled scripting in gateway event script.
Error : syntexError : mismatched input 'paths' expecting INDENT
PFA attached picture of the error and code.
You need to indent everything from line 2 and down.
Highlight everything from line 2 downwards and press tab once.
The error message says it clearly:
SyntaxError: mismatched input 'path' expecting INDENT
You'll also need to surround the path with quotes, as it should be a string:
paths = "[Sample_Tag]Writeable/WriteableInteger2"
Also, your values line will need to be aligned with your paths line.
Also, also system.tag.writeBlocking()
takes a list of paths and a list of values, so you’ll need to surround the parameters with square brackets at least.
system.tag.writeBlocking([paths],[values])
I believe you can do single tag / single value now, but I will agree that it's better to get into the habit of always using lists.
especially when the variable names are paths and values
You can, but I try to keep that secret to myself.
I also tried this option.
But, it's not worked.
What did not work ? What errors do you get ?
This is what your script should look like, try it and report back the actual error message.
"it's not worked" is not an adequate description of the issue. We can't help you if we don't know what's going wrong.
def onScheduledEvent():
paths = ['[Sample_Tag]Writeable/WriteableInteger2']
values = [76]
system.tag.writeBlocking(paths,values)