AXMA-JS for complete idiots like me.
Цитата: Hanon Ondricek от 08.02.19, 23:00In 6.1 I have a choice of how to number this player:
<< choice "One; Two; Three" $ number >>
JS gives this as a template:
choice (false, "choice1", "choice2", "choice3", function () {});
So ...
choice (false, "One", "Two", "Three", function (n) {n (set ($$ choice = number))});
I'm doing it wrong, of course. I want to set (number) as $$ choice.
In 6.1 I have a choice of how to number this player:
<< choice "One; Two; Three" $ number >>
JS gives this as a template:
choice (false, "choice1", "choice2", "choice3", function () {});
So ...
choice (false, "One", "Two", "Three", function (n) {n (set ($$ choice = number))});
I'm doing it wrong, of course. I want to set (number) as $$ choice.
Цитата: DoubleDragon от 09.02.19, 09:54This is made much easier:
choice (false, "One", "Two", "Three", function (n) { number = n; alert(number); });
This is made much easier:
choice (false, "One", "Two", "Three", function (n) { number = n; alert(number); });
Цитата: Hanon Ondricek от 10.02.19, 02:52What is alert(number) ?
What is alert(number) ?
Цитата: DoubleDragon от 10.02.19, 09:54Цитата: Hanon Ondricek от 10.02.19, 02:52What is alert(number) ?
Message box.
Цитата: Hanon Ondricek от 10.02.19, 02:52What is alert(number) ?
Message box.
Цитата: Hanon Ondricek от 20.02.19, 21:32Js skills ... so it will function as a function?
So are these legit?
choice (false, "One", "Two", "Three")
If I don't need a function? Or does it have to be
choice (false, "A", "B", "C", function ());
^stores choice number as $$choice?
otherwise
choice (false, "A", "B", "C", function (variable) {variable = anothervariable});
choice (false, "A", "B", "C", function (variable) {print (variable)});
^ gives the number of the choice, 0-4?
Js skills ... so it will function as a function?
So are these legit?
choice (false, "One", "Two", "Three")
If I don't need a function? Or does it have to be
choice (false, "A", "B", "C", function ());
^stores choice number as $$choice?
otherwise
choice (false, "A", "B", "C", function (variable) {variable = anothervariable});
choice (false, "A", "B", "C", function (variable) {print (variable)});
^ gives the number of the choice, 0-4?
Цитата: Hanon Ondricek от 20.02.19, 21:50I noticed though:
`choice(false,"choice1","choice2","choice3",function(n){result = n});`
If I display n on the next page and the player made a choice it's fine, but if they didn't, $$choice = 0 but n does not...
I noticed though:
`choice(false,"choice1","choice2","choice3",function(n){result = n});`
If I display n on the next page and the player made a choice it's fine, but if they didn't, $$choice = 0 but n does not...