Also why do you have to set variables? Just do RETURN %lines instead of set %line %lines then unset %lins (which you spelled wrong)