nai-tupiq error

hash and array not defined in function