Howdy, Stranger!

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

Supported by

Variable xx not present in var store

Hi everyone,

I`m creating an experiment using OSWeb. In my previously written experiment, I used an inline_script to implement the random selection of 16 integers from 1 to 64 and store them in "num1","num2"……"num16". The experiment can run very well.

However, OSWeb does not support inline_script. So I used an inline_javascript to do the same thing, and the javascript seemed to work. But when it run in the Opensesame/browser, the program always reports an error "Uncaught ReferenceError: Variable 'num1' not present in var store". In the inline_script, I always use exp.set("num1",num1) to store them into var store, but I don`t know how to store them in inline_javascript.

Does anyone know how to solve this problem? Thanks in advance!

Donglin

Comments

  • Hi Donglin,

    Can you try to save the variables simply as var.num1 = <value>? This is slightly less flexible that the exp.set() method ( you can't use it in a loop), but has the same effect eventually.

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.