-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
! var definition is ignored #122
Comments
Hi
User variables are set with
|
Oh, that makes sense. Thanks... Sorry for the bad issue. My problem was that I was going off the code snippets in the tutorial, which briefly mentions bot variables and then goes back to discussing user variables with the same name, so I didn’t correctly identify which code snippets were related to ! var. I guess it doesn’t even make sense to initialize user variables that way, since that would create issues in a multi-user environment.
… On Jun 14, 2018, at 8:43 AM, Noah Petherbridge ***@***.***> wrote:
Hi
! var myvar = hello sets a bot variable named myvar and you'd retreive it with <bot myvar>
User variables are set with <set> and retrieved with <get>.
! version = 2.0
! var myvar = hello
+ print
- myvar is <bot myvar>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I agree naming the command "! var" to set them and to get them is confusing. Same applies to the other types of variables. |
Hi, Author of Rivescript-PHP here, This is kind of off-topic but the Rivescript specs also dictate you can set bot variables in responses. This is something I missed while implementing the bot command.
I know this is off the topic of this issue but I assume not many developers know of this ability. |
Using version 1.14.9, with the following begin.rive
I expect that the user input
print
will result inmyvar is hello
but instead, it results inmyvar is undefined
I also tried putting the
print
trigger into a different file titled hello.rive but this didn't change the behavior.The text was updated successfully, but these errors were encountered: