i am making a game and i am getting a strange error
heres the relevant code
items = {'sword':['sword', 3, 15],
'axe':['axe', 5, 25],
'bow and arrow':['bow and arrow', 4, 20]}
for item in items:
print items[item[0]]
print '\tprice:' + items[item[1]]
print '\tdamage:' + items[item[2]]
Heres my error:
27, in <module>
menu()
File "C:\Documents and Settings\tom\Desktop\Awesome text game\main.py", line 6
2, in menu
menu_input()
File "C:\Documents and Settings\tom\Desktop\Awesome text game\main.py", line 7
0, in menu_input
load_game()
File "C:\Documents and Settings\tom\Desktop\Awesome text game\main.py", line 1
21, in load_game
adventure_menu()
File "C:\Documents and Settings\tom\Desktop\Awesome text game\main.py", line 1
45, in adventure_menu
adventure_menu_input()
File "C:\Documents and Settings\tom\Desktop\Awesome text game\main.py", line 1
52, in adventure_menu_input
store()
File "C:\Documents and Settings\tom\Desktop\Awesome text game\main.py", line 1
87, in store
store()
File "C:\Documents and Settings\tom\Desktop\Awesome text game\main.py", line 1
99, in store
if p.weapon == items[sitem[1]]:
KeyError: 'o'
any help would be appreciated