Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i have a c# function .

C#
public bool setvar(string varname)
   {
       int value = 0;
       try
       {
           if (!string.IsNullOrEmpty(varname))
           {
              return true;
           }
           else
           {
               return "Error";
           }
       }
       catch (Exception)
       {
           throw;
       }
       return value;
   }


This is a call from m lua script.
a,error = setvar("Hi");
I want to return multiple values from my c# fucntion to lua call.

Any Suggestion Plz!
Posted
Comments
Prasad Khandekar 16-Oct-13 4:58am    
Hello Rohit,

Perhaps this stackoverflow thread should give you the answer. (http://stackoverflow.com/questions/14299634/luainterface-a-function-which-will-return-a-luatable-value)

Regards,
rohit24c 16-Oct-13 8:21am    
I had checked that link. But didnt help.
Do u have any code related to it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900