private void validateScript(Controller c, Script s, Dictionary<string, Variable> vars, StringBuilder output) { // if script has never been validated, but has errors, then do not validate, they are parse errors. if (s.Valid == BlockBase.Validation.NeverRan && s.Log.ErrorCount > 0) { s.SetValid(false); // will set valid to failed. return; } s.SetValid(true); if (s.List) { vars.Clear(); s.ExecuteAsList(new Context(c, s, s, 0, vars), output); } else { c.Add(s); while (c.next(output)) { } } s.SetValid(false); }