give Arguments from Command Line into LUA

BECOME PART OF THE COMMUNITY - Sign up here
  • How can I get it done to hand 2 arguments into a LUA script, without using a uservariable? To get one argument into a LUA script works without any problems by using Plugin x 'argument'. Inside the plugin i have the function name (displayhandle, argument) If I use Plugin x 'arg1, arg2' inside the plugin function name (displayhandle arg1, arg2) it only use it as argument....any idea how to get it?

  • do something like this

    Code
    return function(display, argument)
      argument = argument and argument:split(',') or {'no argument given'}  
      for i = 1, #argument do Echo(argument[i]) end
    end
  • Thanks for the hint Andreas....to make it clear for me, the argument in line 1 is like 1,2. And what are the 2 arguments then I use in the Plugin? Is one argument and the other #argument?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!