Advertisement
Guest User

Untitled

a guest
Jul 29th, 2012
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. ...
  2. using Lua;
  3.  
  4. namespace bot
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             Lua lua = new Lua();
  11.             lf = new LuaFunctions();
  12.             lua.RegisterFunction("print_s",lf,lf.GetType().GetMethod("print_s"));
  13.             try
  14.             {
  15.                 lua.DoFile("script.lua");
  16.             }
  17.             catch(Exception err)
  18.             {
  19.                 Console.WriteLine("Lua error : "+err.Message);
  20.                 System.Environment.Exit(1);
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement