Please or Регистрация to create posts and topics.

AXMA-JS for complete idiots like me.

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.

This is made much easier:

choice (false, "One", "Two", "Three", function (n) { number = n; alert(number); });

What is alert(number) ?

Цитата: Hanon Ondricek от 10.02.19, 02:52

What is alert(number) ?

Message box.

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?

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...