if("Swords")
switch(input(usr,"Which Sword","Swords")in list("DragonSword","SaviorSword"))
if("SaviorSword")
var/obj/Bar/IronBar/i = locate() in usr
if(i >= 4)
switch(input(usr,"This Will Cost 300Gold Are You Sure You Want To Buy This","Gold")in list("Yes","No"))
if("Yes")
if(usr.Gold >= 299)
usr.contents += new /obj/Swords/SaviorSword
usr<<"You have just smithed the SaviorSword"
usr.contents -= /obj/Bar/IronBar
usr.contents -= /obj/Bar/IronBar
usr.contents -= /obj/Bar/IronBar
usr.contents -= /obj/Bar/IronBar
usr.contents -= /obj/Bar/IronBar
usr.Smithexp += rand(1,20)
usr.Gold -= 300
usr.SmithingSkillCheck()
return
if(usr.Gold == 300)
usr.contents += new /obj/Swords/SaviorSword
usr<<"You have just smithed the SaviorSword"
usr.Gold -= 300
usr.contents -= /obj/Bar/IronBar
usr.contents -= /obj/Bar/IronBar
usr.contents -= /obj/Bar/IronBar
usr.contents -= /obj/Bar/IronBar
usr.contents -= /obj/Bar/IronBar
usr.Smithexp += rand(1,50)
usr.SmithingSkillCheck()
return
if(usr.Gold <= 300)
usr<<"Not Enough Gold"
return
if("No")
return
Problem description:
runtime error: type mismatch: cannot compare IronBar (/obj/Bar/IronBar) to 4
proc name: Smith (/obj/SmithingTable/verb/Smith)
usr: RGS (/mob)
src: SmithingTable (/obj/SmithingTable)
call stack:
SmithingTable (/obj/SmithingTable): Smith()