i have some code to convert text to ascii but it doesn't work whats wrong?
Code:
/ascii { var %x 0 | var %y $len($1-) | var %t $null | :under | inc %x | if ( %x > %y ) { msg $chan %t | halt } | %t = %t $asc($mid($1-,%x,1)) | goto under }

i also have the code to change it back but that doesn't work either.
Code:
/normal { var %x 0 | var %y $numtok($1-,32) | var %t $null | :over | inc %x | if ( %x > %y ) { msg $chan %t | halt } | if ( $gettok($1-,%x,32) == 32 ) { inc %x | %t = %t $chr($gettok($1-,%x,32)) | goto over } | %t = %t $+ $chr($gettok($1-,%x,32)) | goto over }

problems with both it crashes my mirc.
ps thanks to kando for the help already.