ID:2653653
 
Code:
obj/MapIcons/Bank
var/list/Bank = list()
obj/MapIcons/Bank
verb
UseBank()
set name = "Use Bank"
set category = "Business"
set src in view(2)
var/d = input("What do you want to do?", "Banking Options") in list("Withdraw", "Deposit", "View Bank", "Exit")
if (d == "Exit")
return 1
else if (d == "Deposit")
// var/b = input("What do you want to Deposit?", "Banking Options") in usr.contents
var/atom/movable/object = input("What would you like to Deposit?","Banking Options") as null|anything in usr
if(object)
object.Move(Bank)
usr << "You deposit [object] into your Bank."
else if (d == "Withdraw")
// var/a = input("What do you want to Withdraw?", "Banking Options") in src.Bank
var/atom/movable/object = input("What would you like to Withdraw?","Banking Options") as null|anything in Bank
if(object)
object.Move(usr)
usr << "You withdraw [object] from your Bank."
else if (d == "View Bank")
usr << "You have [Bank] in your Bank."


Problem description:So, my problem is that I am able to deposit and withdraw the items from my Bank, but I am horrible with my understanding of lists and how to use them... How would I go about viewing a list, in this case the "Bank" list for "View Bank"?
Also, I don't need you to do all of the work for me, but how would I use view verb to put the list on a HUD...
I will study more on HUDS, I just need to know how to view the list.
Thank You BYOND.

for(var/atom/movable/item in Bank)
usr << "You have [item.name] in your bank."