1) No need for the me prefix in the ON DISCONNECT event, since that event only responds when you disconnect.
The OP wanted to save it when he disconnected.
2) I avoid the 'table exists' error by using this format in the ON START event
on *:start:{
if !$hget(exempt) .hmake exempt 10
if $exists($mircdirsys\exempt.hsh) hload -i exempt $mircdirsys\exempt.hsh
}
That usually only happens when you overwrite your old script with a new script. Your code is fine if you're going to be loading/unloading it alot but that's about it.