Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Problem with run_if statement

Dear all,

I need your help because I recently updated to Opensesame 4 with OSWeb 2.

I simply need to create dynamically a variable in javascript after a keyboard response, so I did:

var choice = response (after a keboard_response object)

After that I want to use choice variable in a run_if sequence to show 2 different sub-sequence based on choice value, like this:

sequence1 -- run_if [choice] == 1 (in GUI)

sequence2 -- run_if [choice] == 2

I do not know why, but the script exit without entering in sequence1 or sequence2.

I tried also to put choice instead of [choice], but unfortunately it did not work either.

I inspected choice variable and it contains the right value.

Can you help me to solve this misunderstanding? I think I messed up in the recent variable scope different definition. :)

Thank you all!

Comments

Sign In or Register to comment.