Hi,
My text file contains:
{
aaa: “bbb”
}
and my script file contains only one statement
put the value of file “/aa.txt” into universal CONST
when I executed the script, I got the below error:
Script Failed
Sense talk compiler Exception:
in (null):
Syntax error at line 1:unkown - can;t understand “[end of script]” at or near character 1
Note: “/aa.txt” is in Documents folder.
Where went wrong?
Thanks,
Ajay
You’ll need to give the proper path to the file. If the file is in the Documents folder then the path should be “~/Documents/aa.txt”.
The path you gave – “/aa.txt” – specifies a file at the root level of the file system. Since that file doesn’t exist, its value is empty, and the value function gives the error you indicated.
Hi,
Thank you.
I checked the existing of the file in the directory using
“if there is a file”
The actual problem is with the text file.
It was actually .rtf file and I changed its extension to .txt
When I created seperate .txt file, I am able to read it.
Thanks,
Ajay