set src in oview(1)
for(var/obj/BuyableThings/A in src.InventorySet)
for(var/obj/BuyableThings/Clothing/A in usr.client.screen)
for(var/obj/BuyableThings/Weapons/A in usr.client.screen)
for(var/obj/BuyableThings/Scrolls/A in usr.client.screen)
switch(input(usr,"The [src.name] costs [y2k_Uncondense_Num(src.Price)] Ryo. Do you want to buy it?", text) in list ("Yes","No."))
usr<<sound('click1.wav',0);usr<<sound('Cash.wav');usr<<"You bought a [src.name]!";usr.Yen-=src.Price
usr<<"Not enough money!";usr<<sound('click2.wav',0)
I really don't know how to ask it. The point basically is, I'm making a Merchant based systems thus the items you'd buy would pop up on whoever is purchasing's client.screen as objects. That way you can click them and it'd make it easier to make Merchants without all these large amounts of code.
Now I did get it to work. The problem was that I wasn't too sure about the C=A. Because everytime I canceled, which simply deleted all the objects belonging to /obj/BuyableThings/ whenever I tried to buy again it wouldn't work unless there was another NPC. I think the new created C actually are the objects in A and thus deleting them.
Um, I really don't even know if I'm asking this correctly. Could someone help?