• Advertisement
Sign in to follow this  

C#, LuaInterface and modified Lua (EyeonScript)

This topic is 4271 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, my question is regarding C# and LuaInterface. The program I work with Digital Fusion 5 has Lua as an embedded scripting language called EyeonScript. This language extends Lua. For example it is possible to use the statement fusion = Fusion("localhost") to connect to an instance of Digital Fusion from EyeonScript. Now I would like to use LuaInterface to access this version of Lua (EyeonScript) from C#. But as a result I get: > fusion = Fusion("localhost") > stdin:1: attempt to call global `Fusion' (a nil value) stack > traceback: > stdin:1: in main chunk > [C]: ? > dump(fusion) > stdin:1: attempt to call global `dump' (a nil value) stack traceback: > stdin:1: in main chunk > [C]: ? It seems like the additional functions from the EyeonScript version of Lua would need to be registered somewhere to be accessible? I would also think that this might be a common problem as other companies would also include extended versions of Lua with their programs? How has anybody else solved this challenge? Thanks very much for your help Patrick

Share this post


Link to post
Share on other sites
Advertisement
Since Lua is completely independant from C# and LuaInterface, all you really would need to do is replace the Lua DLL used for P/Invoking with the EyeonScript DLL. Once you do that and make sure that the P/Invokes call the correct file, you should be fine to use Fusion within a Lua script.

Share this post


Link to post
Share on other sites
Quote:
Original post by Rob Loach
Since Lua is completely independant from C# and LuaInterface, all you really would need to do is replace the Lua DLL used for P/Invoking with the EyeonScript DLL. Once you do that and make sure that the P/Invokes call the correct file, you should be fine to use Fusion within a Lua script.

Thanks for your answer. That is exactly what I tried and this was the result:
Quote:
> fusion = Fusion("localhost")
> stdin:1: attempt to call global `Fusion' (a nil value) stack
> traceback:
> stdin:1: in main chunk
> [C]: ?
> dump(fusion)
> stdin:1: attempt to call global `dump' (a nil value) stack traceback:
> stdin:1: in main chunk
> [C]: ?


[Edited by - Pat2000 on May 9, 2006 3:10:52 AM]

Share this post


Link to post
Share on other sites
I'm not familiar with the particular program you're using, but it likely has the modified parts in a separate script file or binary that's being loaded when you run it in the normal way but not when you load the interpreter programmatically using LuaInterface. I'm sorry but I can't really help much here.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement