Hi,
I have the script below and my correct answers are in a table column named “Correct_answer”. What I would like is for a sound to play if the answer is correct. I tried adding this to the script: .test.pressed( row.Correct_answer) .success( newAudio("coin7.mp3")
, but it results in a “ERROR: There must be some items in the running order!” error.
Here is my script from the newKey portion. Thanks for any help!
newKey("pressOnArrow", "ArrowLeft", "ArrowRight")
.log("all")
.callback(
getTimer("exposure").stop(),
getTimer("timeout").stop()
)
,
newTimer("exposure", 300).start().wait()
,
getText("num").remove()
,
getKey("pressOnArrow").test.pressed()
.failure( newTimer("timeout", 5000).start().log().wait() )
,
getKey("pressOnArrow").disable()
)
.log( "Correct_answer" , row.Correct_answer )
.log( "ID" , getVar("ID")
))