a dynamic vector from c# to LUA


29 December 2022 - PtokaX (20th anniversary edition) released...
11 April 2017 - PtokaX released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX for Windows 10 IoT released...
3 September 2015 - PtokaX released...
16 August 2015 - PtokaX released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX released...
13 April 2014 - PtokaX released...
23 March 2014 - PtokaX testing version build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

a dynamic vector from c# to LUA

Started by andrea.vermetti, 25 May, 2005, 12:33:56

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Hi people... i'm form Italy and i new in this place.
Forgive my english...

Well i have great trouble....

In a C# class:

 i've got  a vector (of numbers)  of unknown lenght (it's variable), i can count  the records of this vector

so i have vector and vector.size

for example i want  result of the summatory of the values of the vector

i want to call a LUA FILE SCRIPT and give him in input the vector and the vector size and i want that  LUA gives me back the total like a FOR CICLE.

How can i give to LUA my two variables?????

I know how give LUA  variables in static way

this is my code


Lua l=new Lua();

l["num"] = inputVal;
l["num1"] = inputVal1;


total = num+num1;

again in C#

int tot = (int) l("total");


how can i do it in dynamic way

thanks  a lot




bit late but just found this topic.
i think you can find the answer in the lua wiki on //www.lua.org, or ask in the dcdev hub.
as what i get from your question it has more 2 do with the lua api handling in c then the lua scripts we guy's/girls here on the board write.
2 take myself as an example i have 0 knowledge about c.

http://www.plop.nl lua scripts/howto\'s.

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<


I may be too late aswell..
Anyhow.. im not quite sure what you are on about..
You need to work on your english a little bit, lol

SMF spam blocked by CleanTalk