Exemple #1
0
        public static bool Debug(string[] initLines, out string error)
        {
            error = "";
            bool ok = false;

            foreach (string line in initLines)
            {
                if (Datapack.IsValid(line.Trim()) || Reference.IsValid(line.Trim()))
                {
                    if (Reference.IsValid(line.Trim()))
                    {
                        Reference.GetReferences(line.Trim());
                    }

                    error = "";
                    ok    = true;
                }
                else
                {
                    error = $"The {initLines.ToList().IndexOf(line) + 1}. command ({line})!";
                    ok    = false;
                }
            }

            if (!Reference.ValidReferences(out error))
            {
                ok = false;
            }

            return(ok);
        }