Questions tagged [luainterface]

LuaInterface is a library for integration between the Lua language and Microsoft .NET platform's Common Language Runtime (CLR).

LuaInterface is a library for integration between the Lua language and Microsoft .NET platform's Common Language Runtime (CLR). Lua scripts can use it to instantiate CLR objects, access properties, call methods, and even handle events with Lua functions.

95 questions
9
votes
1 answer

Lua: What's the difference between null and nil?

I'm developing a plugin for Oxide 2. I've been learning from other plugins and I've noticed that some of them use null instead of nil. For example: if args[1] == null then Oxide 2 is written in C#, so I assume that null is defined in C# or in Lua…
Genhis
  • 1,484
  • 3
  • 27
  • 29
8
votes
1 answer

Cross-platform C# implementation of Lua

I'm looking for a way to embed Lua into my cross-platform embed application. The problem is - I haven't found any complete, stable, working implementation of Lua on this platform. I've tried the following (here are the list of repositories and their…
Damon Wall
  • 95
  • 7
7
votes
3 answers

C# and Lua -- Current Options?

I created an application that uses the Mono implementation of LuaInterface, and it works beautifully without any hitches on Linux. I can't get LuaInterface to work with the Windows version of my application at all. I've spent two solid days trying…
cmark89
  • 247
  • 2
  • 9
6
votes
2 answers

LuaInterface - how-to restrict access to .Net classes?

I'm trying to embed some Lua scripting functionality in my C# app by using LuaInterface 2.0.3. This is working just fine so far, but I can't figure out how to restrict access to only few specified .Net classes. By default, all .Net libraries are…
Mario
  • 413
  • 5
  • 15
5
votes
2 answers

How to implement a Lua container (virtual file system) module loader in C#

Sounds a little bit scary isn't it? Some background information, I want to load a tar archive which contains some lua modules into my C# application using LuaInterface. The easiest way would be to extract these files to a temp folder, modify the lua…
graugans
  • 240
  • 3
  • 14
5
votes
3 answers

How to use LuaInterface on Mono/Linux

When I try to use LuaInterface on Mono on Linux (using Mono 2.0 on Ubuntu 9.04) I get the following exception: ** (App.exe:8599): WARNING **: Method ':.DoDllLanguageSupportValidation ()' in assembly '/home/ulrich/test/Debug/lua51.dll' contains…
ulrichb
  • 19,610
  • 8
  • 73
  • 87
5
votes
2 answers

How to create a custom .NET dll loadable for Lua(forWindows)?

We are doing a project in .NET framework and want to make most of its functionalities available later for Lua scripts. I thought I could compile a dll and load it to Lua script with the help of LuaInterface. But somehow it did not work. What DID…
proudnoldo
  • 71
  • 1
  • 4
4
votes
1 answer

How to pass a table to lua with c#

How to pass a table to lua with c# I'm using the LuaInterface,this is my c# code using System; using System.IO; using System.Text; using LuaInterface; namespace GetLuaTable { class Program { static void…
Xinbs
  • 43
  • 1
  • 3
4
votes
2 answers

LuaInterface C#: dostring vs dofile. Is it worth loading a script that will be called numerous times into memory?

Can anyone tell me if I can reasonably expect any performance gain by loading a lua script that will be called repetitively into memory for execution through LuaInterface's dostring() functionality rather than dofile()? Am I correct in assuming this…
Drew R
  • 2,988
  • 3
  • 19
  • 27
3
votes
1 answer

Use flag-based .NET enums from Lua

I'm using LuaInterface for .NET to create Windows Forms objects. This works pretty good except for one thing: I want to use the Anchor property of Control to make them resize automatically. If I only set one of the Anchors (e.g. only…
Mira Weller
  • 2,406
  • 22
  • 27
3
votes
1 answer

How to pass a WinForm to Lua (LuaInterface)?

I want to pass a WinForm object to Lua, my code: //Form1.cs class Form1 { private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Button button1; private void button1_Click(object sender, EventArgs e) { Lua m_lua =…
ifan
  • 31
  • 2
3
votes
1 answer

Using LuaInterface with VB.net

I'm trying to wire up Lua to my VB.net game I am making. Now, I've read enough to know that I can wire each function up by itself like seen here: pLuaVM.RegisterFunction("quit", pPrg.GetType(), pPrgType.GetMethod("quit")) Now, how would I make it…
Freesnöw
  • 30,619
  • 30
  • 89
  • 138
3
votes
2 answers

Convert table to Byte array

I'm trying to convert a Lua Table to a C# Byte array. I was able to get a conversion to a Double array to work as follows: > require 'CLRPackage' > import "System" > tbl = {11,22,33,44} > dbl_arr = Double[4] > dbl_arr:GetValue(0) >…
SwDevMan81
  • 48,814
  • 22
  • 151
  • 184
3
votes
2 answers

C# external library (Lua) call problem

I'm new to programming in C# (VS2010) .Net (4.0) and I'm encountering I couldn't solve by myself since some days already. I'm using an external scripting language (Lua) in my C# code. To do so I use LuaInterpreter built for .Net 4.0 First try: The…
3
votes
1 answer

Embedding LuaInterface in a C# application has slow performance?

I've embedded the LuaInterface project into an application written in C# using .NET Framework 4.0. After compiling LuaInterface and Lua 5.1 I've referenced them in my application and created a Lua VM and exposed a few .NET classes. When the Lua VM…
Deathspike
  • 8,582
  • 6
  • 44
  • 82
1
2 3 4 5 6 7