ID:261277
 
Alright, say you have a mining code.
and when you mine, you get steel ores that go into your inventory
contents


well, i want to make a guy who you can sell the steel ores to
here is my code and it doesnt work

mob
Man
icon = 'mineman.dmi'
verb
Talk()
set src in view(1)
var/sell = input("Do you want, like, this pick? it costs 200 dollars!") in list ("Yes","No")
switch(sell)
if("Yes")

usr.credits += 200
usr.contents -= obj/ore/steel

if("No")
usr << "Umm, ok man."
DBGT Z wrote:
Alright, say you have a mining code.
and when you mine, you get steel ores that go into your inventory
contents


well, i want to make a guy who you can sell the steel ores to
here is my code and it doesnt work

mob
Man
icon = 'mineman.dmi'
verb
Talk()
set src in view(1)
var/sell = input("Do you want, like, this pick? it costs 200 dollars!") in list ("Yes","No")
switch(sell)
if("Yes")

usr.credits += 200
usr.contents -= obj/ore/steel

if("No")
usr << "Umm, ok man."


you dont need the sell var