Example #1
0
 public Script(string Filename, bool Compiled = true, Game game = Game.Base)
 {
     if (Compiled)
     {
         if (!ScriptRead.ReadCompiled(this, System.IO.File.ReadAllBytes(Filename), game))
         {
             throw new Exception("[load] error: failed to load script.");
         }
     }
     else
     {
         if (!ScriptRead.ReadSource(this, Filename, game))
         {
             throw new Exception("[load] error: failed to load script.");
         }
     }
 }