ID:162923
 
Ok, i thought this worked before but now when i click on it with the right gear nothing happens but if i dont have the gear it still goes to the else statement come back when you have them???



verb/buy()
set src in oview(1)
var/obj/ext/Z= locate(/obj/ext) in usr.contents
var/obj/csuit/Y= locate(/obj/csuit) in usr.contents
if(Z & Y)
switch(input("Would you like to buy a Ore Truck kinda used and run down but....140 credits") in list ("Yes","No"))
if("Yes")
if(usr.credit>139)
var/W = new/obj/oret1
W:loc = locate(58,26,1)
usr.credit -= 140
usr<<"Old Ore Truck added to your inventory"
else
usr<<"You don't have enough credits"
if("No")
usr<<"have fun mining with no ore truck"

else
usr<<"Come back when you got a Extractor and a Chrono Suit"
if(Z & Y) is the problem. You need two && to do a boolean check. && means "and" in an if statement. & is a bitwise operator.

~X