I have a problem with assigning the variables between the code component and the text component
My goal is to let the code component run when the routine begins, check the condition lang whether its 1 or 2, and assign a string text into another variable asking, which should be present on the screen in the text component. Image are shown below
(I have to combine it into a single image because of weird new user restriction)
however, when I ran it, the asking component did not update itself and still showed “nothing” as a default value at the beginning of the experiment
I believe the loop condition is set correctly and should not be the source of the problem
I think It is because I am not familiar with how the code component and every component run in sequence too
A couple of questions: is lang properly defined in an Excel sheet or code? If not, then that is a big issue here. Please share how, and I might be able to give some advice. If it is an Excel sheet, do you read it in, or is it in a loop? For code, is this it? Do you want the text component to say ‘Nothing’ sometimes, or do you just want English or Tai?
I set the “nothing” at the begin of experiment because it shows that the asking is not predefined before I put it in. It also let me know that at least the variable is assigned, just not getting updated when the routine begin in the code component. but I actually want only English or Thai