a dynamic vector from c# to LUA
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 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.

andrea.vermetti

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

C#

Lua l=new Lua();

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


in LUA FILE

total = num+num1;

again in C#

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

************************

how can i do it in dynamic way


thanks  a lot

ANDREA


 





plop

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.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

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

kepp

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
Guarding    

SMF spam blocked by CleanTalk