mob
proc
Box_Office2(mob/M in world)
var/list/L = new
L += "Ticket"
L += "Sign Up"
L += "Forget it"
var/answer = input("Hello what would you like to do? Just a note: Tickets cost 5$[M]?") in L
switch(answer)
if("Ticket")
M << "You have purchased a seating ticket, thank you"
if(usr.currency)
usr.currency=0
usr.currency=-0
M << "Sorry you do not have enough money"
if(usr.currency)
usr.currency=1
usr.currency=-5
M << "Thank You, heres your ticket"
usr.contents+=/obj/Ticket
if("Sign Up")
src << "You have chosen to participate in the budokai"
usr.contents+=/obj/Application
if("Forget it")
src << "You've changed your mind"
return
Ok here's the deal, the problem I have is now a runtime error, due to this part of the code I'm sure
M << "You have purchased a seating ticket, thank you"
if(usr.currency)
usr.currency=0
usr.currency=-0
M << "Sorry you do not have enough money"
if(usr.currency)
usr.currency=1
usr.currency=-5
M << "Thank You, heres your ticket"
usr.contents+=/obj/Ticket
I need it to basicly deduct money from the currency stat, and also if the money is available which is 5$ , put it into the Inventory. I tried some If functions, like "If(usr.currency)" but I don't think it's going to work.
I basicly need it for just the ticket function . But I've also tried to make it so if I don't have the money it tells me I don't have anough, this also does not work, can somone help me?