ID:142140
 
Code:
mob/proc
Mute_Cypher(var/txt)
var/returntxt=""
if(!istext(txt))return
for(var/i=0, i<length(txt),i++)
var/I = copytext("[txt]",i,i+1)
I=text2ascii(I)
if((I>=48 && I<=57)||(I>=65 && I<=90)||(I>=97 && I<=122))
I="."
else I=ascii2text(I)
returntxt+=I
return returntxt


Problem description:
I don't know the exact issue, but it says "runtime error: bad text or out of bounds" whenever i use it. I dunno why it's doing this.
You're starting i at 0, but strings are 1-indexed. The correct for() loop is:

for(var/i=1, i<=length(txt), i++)


Lummox JR
In response to Lummox JR
Wow..... Thanks Lummox JR! Now I feel stupid. :P