looping variable undefined #1369
Unanswered
mingjia1025
asked this question in
Q&A
Replies: 1 comment
-
Hi @mingjia1025, If you want to use a variable whose value changes during the experiment then you need to use dynamic (function) parameters. var start_test = {
type: 'html-button-response',
stimulus: "",
choices: function(){
return ["Click here to begin test block " + String(iblock_test)]
}
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@jodeleeuw
I'm trying to encapsulate my timeline nodes start_test (lines 490-494), testBlock (496 - 565) and end_test (567-583) as a looping timeline indexed by the variable iblock_test(defined in line 585) . The looping variable is referred to in all three of my component nodes but is only accessible for the testBlock and end_test. It's printed out as "undefined" on screen in the start_test node.
What might be causing this problem?
Here is my full experiment code on cognition.run:
https://qsk2df8eco.cognition.run
Beta Was this translation helpful? Give feedback.
All reactions