Problem with alert in Developer Help
|
|
When I activate this verb via a button on the shop window, a dialog pops up to select an object in the usr.contents before the alert comes up. I don't know why there is a prompt to select an object in usr.contents. The purchased item will always go to the user's equipped pack (usr.pack).
obj/object/verb PurchaseSelected() if(usr.SelectedObject) var/obj/object/L = usr.SelectedObject if(!(L in usr.pack)) if(L.price1) if(alert("Would you like to buy the [L.name] for [L.price1] copper?","Buy","Yes","No")=="No")return usr.copper-=L.price1 var/obj/object/s=new L.type s.loc=usr.pack usr.IncreaseWeight(O=s,P=usr.pack) usr.WeightLabel() usr.UpdateShop()
|
Thanks for any assistance.
|