RemiHiyama wrote: Sun Jul 07, 2019 3:22 pmJust display the choice so it's possible to see if the eval is working or not. Here's the contents of the label for that first choice.xman911 wrote: Sun Jul 07, 2019 9:32 am What does the button of "Do the thing" does?! Maybe you should also show what code and where, by showing some screenshots.
If it was doing what I wanted it to, it should only show "pizza" on the first button if you push "Do the thing" first. Otherwise it should say "pancakes" or "waffles", depending on the current value of foo, and when foo changes the button text should change along with it.Code: Select all
<eval>foo</eval>
But it doesn't. Pressing 'Set foo to "pancakes"' does what it says it's supposed to (as verified by the lines saying the current value of foo), but when pushing "Do the thing", the button still shows the value that was set in the initialization script.
You display things with "Say" not with "Eval" . "Eval" is to push things into the variable... "Say" is to show what the value of the said variable is right now.
So if you want for example to push the word "pizza" into your food variable you will use "Eval" and write:
There is an eval function in the choice button itself so you can change the variable with the push of a button.
Code: Select all
food = "pizza"
Code: Select all
food
Here is an example, that every time you push the button "Give me more "pizza" " it will increase the number of pizza.
https://milovana.com/webteases/showteas ... e27f313cd4
Then you can add another function, that will trigger if the number of "pizzas" becomes greater than 5.
Of course that counting of the number of "pizzas" can be made invisible for the user, and can be made on different pages, with hidden timers and what not.



