Did you post the entire script? AFAIK, GroupAdd() is not a built-in KiX function.