mob/NPCs/shop1
name = "Shop Bloke"
icon = 'mob85.dmi'
dir = WEST
DblClick()
if(get_step_away(src,usr,1))
var/list/Inventory = list(/*usr.contents,*/"Iron","Copper","Cancel")
var/list/choices1 = list("Buy","Sell","Cancel")
var/list/forsale = list("Iron Bar","Copper Bar","Clothes","Cancel")
input("What Would You Like To Do?","Shop Guy") in choices1
if("Buy")
input("What Would You Like To Buy?","Shop Guy") in forsale
if("Iron Bar")
if(usr.cash >= 100)
usr<<"You buy the iron bar."
new /obj/Pickupable/bars/iron(usr)
usr.cash -= 100
goto end
else if (usr.cash <= 99)
goto end
else if("Copper Bar")
if(usr.cash >= 50)
usr<<"You buy the copper bar."
new /obj/Pickupable/bars/copper(usr)
usr.cash -= 50
goto end
else if (usr.cash <= 49)
goto end
else if("Clothes")
if(usr.cash >= 10)
usr<<"You buy the clothes."
new /obj/Pickupable/Clothes(usr)
usr.cash -= 10
goto end
else if (usr.cash <= 9)
goto end
else if("Cancel")
goto end
else if("Sell")
input("What Would You Like To Sell?","Shop Guy") in Inventory
if("Copper")
for(var/obj/Pickupable/bars/copper/O in usr.contents)
usr<<"You sell the Copper Bar."
del O
usr.cash += 30
for(var/obj/Pickupable/ores/copper/D in usr.contents)
usr<<"You Need to refine Copper before selling."
goto end
else if ("Iron")
for(var/obj/Pickupable/bars/iron/O in usr.contents)
usr<<"You sell the Copper Bar."
del O
usr.cash += 75
for(var/obj/Pickupable/ores/iron/D in usr.contents)
usr<<"You Need to refine iron before selling."
goto end
else if ("Cancel")
goto end
end
Problem description:
Code Ignores what I Order it to do, I beleiveit has something to do with spacing but when I atempt to sort it out it starts saying
Mine Files.dm:185:error::invalid expression
Mine Files.dm:211:error:else :'else' clause without preceding 'if' statement
and thn gives me warnings, I amde this code myslef whilst disconnected from internet.
Please help me.