
OldBotBuilder
USA
Asked
— Edited
This script has run without errors.
ControlCommand("Answer array", ScriptStart)
#Get 1 0f 16 random phrases from the array Answers
$z = (GetRandomUnique(0,15))
$phrase = ($Answers[$z])
ControlCommand("Script Manager"' ScriptStart, Speak (phrase")
But, now with ARC - Version 2016.02.18.02 I get:
Error on line 4: Input string was not in a correct format.
The last release that this script ran correctly was the one downloaded on 02/02/201.
Yes - the second way is correct. Absolutely not the first way... There is an examples folder in ARC and quite a few of the examples are regarding how to use Arrays. ARC array is similar format as all programming languages, as such, and each have their own constructor...
Brackets are only used for the reasons stated above, to override math operations or for function parameters. Such as...
You do not use brackets for absolutely any other reason - specifically never used while declaring a string...