proc/hurttrue(obj/bed/B as obj in oview(0))
usr.psionicgraphic()
var/healing = rand(1,usr.psionic)
//stops going through proc here
B.hurtpoints -= healing
if(B.hurtpoints <= 0)
B.icon_state="2"
B.hurt = 0
usr << "<font size = 6></font><font color=[usr.fontcolor]> <b>You've saved the patient!</b></font>"
usr:exp += B.exp
usr << "You gain [B.exp] experience."
usr.credits += B.credits
usr << "You earn [B.credits] credits."
var/obj/item/Blue_Ribbons/R = locate() in usr.contents
var/blueribbon = new/obj/item/Blue_Ribbons
usr<<"You recieve [B.exp] Blue Ribbons."
if(!locate(R) in usr.contents)
usr.contents.Add(blueribbon)
var/obj/item/Blue_Ribbons/L = locate() in usr.contents
L.amount+=max(B.exp-1,0)
L.suffix="[L.amount]"
else
R.amount+=B.exp
R.suffix="[R.amount]"
usr.checkexp()
sleep(200)
B.icon_state="1"
B.hurt=1
B.hurtpoints=B.startinghurtpoints
else
usr << "He begins to mend, but is still in bad shape."
No errors at compile, but when this proc gets triggered it doesn't run the proc past the point I commented in the code, it just ends the proc and does nothing, I have this working fine in another proc but here it won't work not sure why. I'm trying to make the code a bit more modular by putting into another proc what will be done multiple times in another proc. Hope that's enough info
Mike
Second problem: usr usr usr usr usr usr usr usr USR. usr does NOT belong in procs. Most likely, you should be using an argument, or this should be a proc belonging to mob/ and it should be src. However, usr is almost certainly wrong.
Third problem: the colon operator. This probably stems from problem two.
Really, the big problem here is the gross abuse of usr. Either pass an argument or have this proc belong to a mob.