Exemplo n.º 1
0
 public Script(byte[] Bytes, Game game = Game.Base)
 {
     if (!ScriptRead.ReadCompiled(this, Bytes, game))
     {
         throw new Exception("[load] error: failed to load script.");
     }
 }
Exemplo n.º 2
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.");
         }
     }
 }