Closed ghabxph closed 6 years ago
args
is the right name, but it's an array type, so you'd want args[0]
in your example.
The args
array follows "shell quoting" style -- generally, all of the space-separated words from the <call>
tag go into individual array elements, but quoted strings are treated like single words.
So if you want the entire <star>
to come in as one argument even if the user typed spaces, put quotes around it. Longer example:
+ what is the md5 hash of *
- The hash of "<star>" is: <call>hash md5 "<star>"</call>
If the user said "what is the md5 hash of hello world"
<call>hash md5 "hello world"</call>
args = ["md5", "hello world"]
Ah I see. It is working now. Thanks for your help :)
We can now close this issue.
How would I achieve this similar scenario below in javascript version of this rivescript?
Args is the argument entered. This code is broken of course. Is this kind of scenario possible? If it is, how is it done?