Problems with If then and else if JAVA
Hi, I am buidling an iowa gambling task.
On every trial, participants have to choose between 4 decks of cards using the keyboard keys 1,2,3 or 4. The decks have different reward and punshment contingencies. The losses vary on each trial and are presented in a loop (a, b, c and d colums represent each deck)
I then have an inline JAVA script to calculate feedback and update total score after every deck selection.
Regardless of the which deck I select, the script only implements the if section for response 1. Are there any glaringly obvious errors in my java script?
Many Thanks
Deiniol

Comments
Shouldn't = be ==?
Thanks @JasperdeWaard
That worked
Thank you. I need to get my head around = == ===.
Hello @Skilli ! I'm trying to build the IGT for my own experiment. Could you please help out? Any help would be much appreciated! Thanks a lot!
Hi @Tanvi,
Please do not send the same request in multiple posts, so that infrmation remains all in the same location for users and to avoid duplication.
You qlready posted this request here: https://forum.cogsci.nl/discussion/9475/computerize-iowa-gambling-task-igt-on-opensesame#latest
Please also be aware of posting to the appropriate forum: Open Sesame or OSWeb,.
Best,
Fabrice.