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?