Example #1
0
 public void Execute()
 {
     try
     {
         Script.Execute(Scope);
     }
     catch (Exception e)
     {
         if (e.Message.Contains("BrawlBox") ||
             e.Message.Contains("bboxapi"))
         {
             BrawlAPI.ConvertPlugin(Script.Path);
             Execute();
         }
         else
         {
             string msg = $"Error running plugin \"{Path.GetFileName(Script.Path)}\"\n{e.Message}";
             MessageBox.Show(msg, Path.GetFileName(Script.Path));
         }
     }
 }
Example #2
0
        public void Execute()
        {
            try
            {
                Script.Execute(Scope);
            }
            catch (Exception e)
            {
                if (!_converted)
                {
                    _converted = true;
                    if (BrawlAPI.DepreciatedStrings.Any(s => e.Message.Contains(s)))
                    {
                        BrawlAPI.ConvertPlugin(Script.Path);
                        Execute();
                        return;
                    }
                }

                string msg = $"Error running plugin \"{Path.GetFileName(Script.Path)}\"\n{e.Message}";
                MessageBox.Show(msg, Path.GetFileName(Script.Path));
            }
        }