public ModScriptParser(string path, ref BundleMod mod, NameIndex fileIndex)
 {
     scriptPath = path;
     this.mod = mod;
     this.index = fileIndex;
     currentLineNumber = 1;
 }
 static void Main(string[] args)
 {
     if (args.Length == 0 || args.Length > 2)
     {
         Console.WriteLine("Usage: pdmodscript <input script> <output mod file>");
         return;
     }
     try
     {
         BundleMod newMod = new BundleMod();
         NameIndex fileIndex = new NameIndex();
         fileIndex.Load("bundle_db.blb");
         ModScriptParser parser = new ModScriptParser(args[0], ref newMod, fileIndex);
         parser.Parse();
         //Use the @name for output filename
         if (args.Length == 1)
             Save( parser.getModName() , newMod);
         else
             Save(args[1], newMod);
     }
     catch (Exception e)
     {
         Console.Write("[ERROR] {0}\nTrace: {1}", e.Message, e.StackTrace);
         return;
     }
 }