ID:191161
 
(Can a mod move this to code probs?)


mob/verb/trade(mob/M in world,O1 as obj in usr,O2 as obj in M)
if(!M.client)
usr <<"You cant trade with NPCS!"
else
switch(input("[usr] wants to trade [O1] for one of your items([O2]) Do you accept? if so type Yes or No.", "Bartender") in list ("Yes","No"))
if("Yes")
usr <<"[O1] fades from your invetory and to [M]'s"
usr <<"A new item fades into your invetory([O2])"
M <<"[O2] fades from your invetory and to [usr]'s"
M <<"A new item fades into your invetory([O1])"
if("No")
usr <<"Trade canceled."
M <<"Trade canceled."

its not working?

This does not belong in Off Topic.
mob/verb/trade(mob/M in world,O1 as obj in usr,O2 as obj in M)
if(!M.client)
usr <<"You cant trade with NPCS!"
else
switch(input(<font color=red>M,</font>"[usr] wants to trade [O1] for one of your items([O2]) Do you accept? if so type Yes or No.", "Bartender") in list ("Yes","No"))
if("Yes")
usr <<"[O1] fades from your invetory and to [M]'s"
usr <<"A new item fades into your invetory([O2])"
M <<"[O2] fades from your invetory and to [usr]'s"
M <<"A new item fades into your invetory([O1])"
if("No")
usr <<"Trade canceled."
M <<"Trade canceled."
In response to Malver
Still not working.
In response to Siientx
How isn't it working?
In response to Siientx
Siientx wrote:
Still not working.

Well, you didn't even say how it wasn't working in the first place. I did what I assumed was fixing it, but I guess you'll need to tell us exactly what you want it to do.
In response to Garthor
I click the link and it don't even tell me that i can't trade with myself.
In response to Siientx
Probably because it doesn't do that check anywhere in your code.