Synbot Plugin icon Synbot Plugin — Synbot plugin for ARC: local Bot Server chatbot integration with SIML dialogs, ControlCommand API, multi-language, learning and emotion support. Try it →
USA
Asked — Edited
Resolved Resolved by DJ Sures!

Filereadall Stops Working

Tested with the last version and the previous version

The following code:


1: ClearVariables()
2: $test1 = FileReadAll("c:\dev\test.txt")
3: FileReadClose("c:\dev\test.txt")
4: Print(Length($test1))

Generates an error:

Quote:

Error on line 4: Missing String Quotes or Invalid Expression at index 0: "hello

the "hello" is inside the file, not in the code.


ARC Pro

Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

Author Avatar
PRO
USA
#9  

if the content of the file has a "(" the error is:

Quote:

Error on line 4: Missing ) in Expression

I didn't check other combinations but if there is a RegEx involved,

i'm not a fan of regular expressions, although they are very useful.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#10  

oh - reading from a file - yeah. i will have to add a new function. A while ago there was a request to read code from a file with functions. This was implemented a long time ago but a function that reads which doesn't execute the function can be created.

I'll have to create a second version of file commands for that.