Hey dude, the only thing I saw faulty in your code is referenced at line number 26.

Your trying to add an item to table name (badwords) not (words).

Code:
.hadd [color:red]badwords[/color] $did(1) $did(1) | did -a $dname 1 $did(1) | did -d $dname 1 $did(1)


Just a suggestion but for your INIT event I'd also check to see if words.dat exists so it only loads data if it's $true.

-Andy