Howdy, Stranger!

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

Supported by


edited June 2016 in OpenSesame

Hello..I have a first variable ("give"). And I have a second variable that is the response to text input ("my_response_var"). I want to create a third variable that will be likewise: 50- [give]+ [my_response_var"] and then show the third variable at a sketchpad. How can I do that?

Thanks for your help 


  • edited 12:08PM


    You can use Python in text strings with the [= ... ] syntax, as shown here:

    In your case, it seems like the following text would do the job: "[=50-var.give+var.my_response_var]"

    Does that help at all?


  • edited 12:08PM

    Hi, thanks for your answer, but it's not working..
    this is the error:


    item-stack: experiment[run].new_loop_3[run].men_1[prepare].new_sketchpad_9[prepare]
    exception message: unsupported operand type(s) for -: 'int' and 'unicode'
    time: Tue Jun 14 11:05:35 2016
    exception type: TypeError

    What can I do?

    Thanks again

  • edited 12:08PM


    It seems that the second variable of that equation is a string type rather than a number type. You have to specify that the value of that second variable should count as a number. You can do that by means of using "int(my_response_var)".



Sign In or Register to comment.