ID:140884
 
Code:
i keep trying to fix it but i always come up with errors what did i do wrong??



Problem description:

mob/verb/OOC(t as text)
if(usr.muted){return 0}
else(world<<"[usr.name] says: [t]")



mob/verb/say_to_view(t as text)
view()<<"[usr.name] says: [t]"



mob/verb/whisper(mob/M in world, t as text)
M<<"[usr.name] whispers: [t]"
usr<<"You say [t] to [M.name]!



mob/var/muted=0
mob/mod/verb/mute_person(mob/M in world)
M.muted=1
usr<<"You mute [M.name]"
M<<"You have been muted!"



You're not using else correctly. Look it up in the reference: http://www.byond.com/docs/ref/info.html#/proc/if

Also, code goes BETWEEN the <DM></DM> tags. It makes it formatted in a readable manner.
If you just used if(!usr.muted) it would work too, you don't really need the return there, without it there it will still do nothing unless your verb is bigger than it looks like and has other code not part of else that would be under it.
mob/verb/OOC(t as text)
if(usr.muted){return 0}
else(world<<"[usr.name] says: [t]")



mob/verb/say_to_view(t as text)
view()<<"[usr.name] says: [t]"



mob/verb/whisper(mob/M in world, t as text)
M<<"[usr.name] whispers: [t]"
usr<<"You say [t] to [M.name]!



mob/var/muted=0
mob/mod/verb/mute_person(mob/M in world)
M.muted=1
usr<<"You mute [M.name]"
M<<"You have been muted!"


You open a string but don't terminate it in the verb Whisper.
Also You should really add in some parsing into these to stop people being able to spam, like:
txt=html_encode(txt)// this makes html code be displayed instead of parsed i.e. it stops players from changing the colour size etc. of their text.

txt=copytext(txt,1,1024) // this stops people from having incredibly long messages.


Of course you will also need something to stop people spamming carriage return codes etc.
In response to Lyndonarmitage1 (#3)
i still get a error saying 14 unterminated text (expecting ")
In response to Pauloiu (#4)
mob/verb/whisper(mob/M in world, t as text)
M<<"[usr.name] whispers: [t]"
usr<<"You say [t] to [M.name]! <----- Need a "


Your missing a " on the end look.