## I would like to keep track of the number of 'coins' a participant has left.

##### I would like to keep track of the number of 'coins' a participant has...
 Author Message maya_mcg          Group: Forum Members Posts: 7, Visits: 27 In my experiment, I would like to start the participant off with 100 coins. Throughout the experiment, the participant encounters 'betting' trials where they are able to bet a certain number of their coins.I used radiobuttons to record the participants' bet.Is it possible to keep track of the number of coins that were bet, and then inform the participant of how many coins they have left when they encounter the next betting page (100 minus the number of coins they have bet thus far)?Below is my code for the betting radiobuttons and the betting surveypage: / options = ("1 Coin", "2 Coins", "3 Coins","4 Coins", "5 Coins", "6 Coins", "7 Coins", "8 Coins", "9 Coins", "10 Coins")/ optionvalues = ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")/ required = true/ questions = [1=bet_radiobuttons]/ showpagenumbers = false/ showquestionnumbers = false/ stimulustimes = [1=how_many]/ recorddata = true Dave posted 2 Weeks Ago ANSWER         Group: Administrators Posts: 10K, Visits: 62K +x maya_mcg - 11/12/2020In my experiment, I would like to start the participant off with 100 coins. Throughout the experiment, the participant encounters 'betting' trials where they are able to bet a certain number of their coins.I used radiobuttons to record the participants' bet.Is it possible to keep track of the number of coins that were bet, and then inform the participant of how many coins they have left when they encounter the next betting page (100 minus the number of coins they have bet thus far)?Below is my code for the betting radiobuttons and the betting surveypage: / options = ("1 Coin", "2 Coins", "3 Coins","4 Coins", "5 Coins", "6 Coins", "7 Coins", "8 Coins", "9 Coins", "10 Coins")/ optionvalues = ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")/ required = true/ questions = [1=bet_radiobuttons]/ showpagenumbers = false/ showquestionnumbers = false/ stimulustimes = [1=how_many]/ recorddata = trueYes./ coins_left = 100/ trials = [1-5 = bet]/ caption = "You have <%values.coins_left%> coin(s) left. How may coins do you want to bet?"/ options = ("1 Coin", "2 Coins", "3 Coins","4 Coins", "5 Coins", "6 Coins", "7 Coins", "8 Coins", "9 Coins", "10 Coins")/ optionvalues = ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")/ required = true/ ontrialend = [    values.coins_left -= radiobuttons.bet_radiobuttons.response;]/ questions = [1=bet_radiobuttons]/ showpagenumbers = false/ showquestionnumbers = false/ recorddata = true maya_mcg          Group: Forum Members Posts: 7, Visits: 27 +x Dave - 11/12/2020+x maya_mcg - 11/12/2020In my experiment, I would like to start the participant off with 100 coins. Throughout the experiment, the participant encounters 'betting' trials where they are able to bet a certain number of their coins.I used radiobuttons to record the participants' bet.Is it possible to keep track of the number of coins that were bet, and then inform the participant of how many coins they have left when they encounter the next betting page (100 minus the number of coins they have bet thus far)?Below is my code for the betting radiobuttons and the betting surveypage: / options = ("1 Coin", "2 Coins", "3 Coins","4 Coins", "5 Coins", "6 Coins", "7 Coins", "8 Coins", "9 Coins", "10 Coins")/ optionvalues = ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")/ required = true/ questions = [1=bet_radiobuttons]/ showpagenumbers = false/ showquestionnumbers = false/ stimulustimes = [1=how_many]/ recorddata = trueYes./ coins_left = 100/ trials = [1-5 = bet]/ caption = "You have <%values.coins_left%> coin(s) left. How may coins do you want to bet?"/ options = ("1 Coin", "2 Coins", "3 Coins","4 Coins", "5 Coins", "6 Coins", "7 Coins", "8 Coins", "9 Coins", "10 Coins")/ optionvalues = ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")/ required = true/ ontrialend = [    values.coins_left -= radiobuttons.bet_radiobuttons.response;]/ questions = [1=bet_radiobuttons]/ showpagenumbers = false/ showquestionnumbers = false/ recorddata = trueThank you so much!

#### Merge Selected

Merge into selected topic...

Merge into merge target...

Merge into a specific topic ID...