ID:165969
 
I'm not going to put this in the code problems, because there isn't a problem, but I have started the code. I'll try to explain.

mob/verb/lolo(msg as text)
if(copytext(msg,1,2)==":")
world<<"[src] [copytext(msg,2)]"
else
world<<"[src]: [msg]"


So far, as you can see, what the code does is, whenever a user enters a message through the verb "lolo", if they start it with a : then it comes out as an emote.

What I need it to do is so that, if they type it :, instead, it starts out like "Bob, after considering his options, took leave." The problem is that, with what I'm using, it would appear, "Bob , after considering his options, took leave.".

Help please :(

Thanks in advance.
Well, that is happening because of the space in
world<<"[src] [copytext(msg,2)]"



To avoid a space for , only but have it for the rest, you can use the ? operator (basically like a compact if() and else().. look it up)

world<<"[src][copytext(msg,2,3)==","?"" : " "][copytext(msg,2)]"


- GhostAnime
In response to GhostAnime
That seems to have worked. Thanks a bunch.
In response to Chance777
No problem, just make sure you understand why it worked, incase a similar problem arises or you may learn a cool trick tat will help out a lot down the road <_<

- GhostAnime