Are your permissions set correctly? Illegal access may indicate a problem there.

Can you PM me the mod you are working with (zipped). I'll take a look.