Hi all,
I tried following the solution that Chris provides on oTreehub, but am getting the following error: "AttributeError: 'Participant' object has no attribute 'app_payoffs'"
I use this code in Subsession:
"
for p in subsession.get_players():
# initialize an empty dict to store how much they made in each app
p.participant.app_payoffs = {}
"
and this code in Group:
"
import random
for p in group.get_players():
participant = p.participant
x = random.randint(100, 200)
if x <=149:
p.potential_payoff = p.earnings1 + p.range1_earnings
else:
p.potential_payoff = p.earnings2 + p.range2_earnings
# __name__ is a magic variable that contains the name of the current app
participant.app_payoffs[__name__] = p.potential_payoff
"
then call the function in the waiting page at the end of the app.