Howdy, Stranger!

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

Supported by

Trying to run the beginners tutorial

Hi, I am newbi using OpenSesame. I am following the beginners tutorial and trying to run the experiment (gaze cuing). When I finish practice period the program crash and I have this message:

x should be int or float, not

Any solution?

Thanks in advance

Comments

  • Hi @m2o ,


    Thanks for your interest in OpenSesame and welcome to the forum! :)

    It sounds like something goes wrong either when you define the variables for the x coordinates for the target or the distractor, or when you are trying to use them.


    Could you check:

    • The loop item (in the tutorial called the "block_loop") where you define the variables "target_pos" and "dist_pos". Are you sure all the cells in these columns filled with numbers? Aren't there any empty rows, for example at the end of the table? If so, you should remove them
    • The sketchpad item where you use the variables "target_pos" and "dist_pos". Are you sure you are using the square-bracket syntax to define the x coordinates correctly, like so?

    For the target letter:

    draw textline center=1 color=black font_bold=no font_family=mono font_italic=no font_size=32 html=yes show_if=always text="[target_letter]" x=[target_pos] y=0 z_index=0
    


    And for the distractor letter:

    draw textline center=1 color=black font_bold=no font_family=mono font_italic=no font_size=32 html=yes show_if=always text=X x=[dist_pos] y=0 z_index=0
    


    If these tips don't solve your issue, could you upload your osexp file here (by clicking the paperclip icon)? Then I'm sure we can help you.


    Cheers,


    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • Dear Lotje,

    Thank you very much for your quick comments. I tried your options, but it did't work. I am sending you my osexp.

    Thanks in advance


  • Hi @m2o ,


    Thanks for the script! You're almost there. The only thing is that, for some reason, the x coordinates of the text elements in the feedback display got lost (see screenshot below). If you set the x coordinates to something else (0, for example) your script should work. Good job!


    Cheers,


    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • Thank you very mach. The experiment runs now. However, I have 2 problems:

    1) The sounds works every answer when I run the program in my laptop, but there is no sound if I run the experiment in a browser.

    2) The accuracy result is always 'undefined ' when I run the experiment in my laptop and 0 in the browser.

  • Hi,

    I was able to solve the accuracy result. I wrote 'correct_response' instead of 'correct_resp' in the loop_block. I solved the sound problem.

    Thank you very much for your help

  • I am using gaze tutorial template in a experiment about percentages perception. I am having the same problem with 'acc' variable.


  • Hi,

    I was able to solve the accuracy result. I wrote 'correct_response' instead of 'correct_resp' in the loop_block.

  • I don't know what I did, bit it works!!!


    Cheers!!

  • Hi @m2o ,


    Great to hear! Did you also solve the sound issue?


    Cheers,


    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • Yes, the sound works properly.

Sign In or Register to comment.