2

I am trying to compile a LUA script and continuously getting:

can not use '...' outside a var arg function near '...'

I have spent ages trying to get it work.

Here is a demo of what I have tried.

Function Demo(Val_1,Val_2,Val_3)
Local A1, A2, A3, A4
A1 = {
[4] = ...
}
A4 = ...
;({
[4] = ...
})[1] = A2
;({
[4] = ...
})[2] = A3
;({
[4] = ...
})[3] = A4

--Rest of data is used further on.... Just keep getting errors in this section.

Would someone please restructure this? I am using VB.NET and this is a little confusing. I have had a go, but it doesn't run correctly.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 2
    What does this code should do? – Egor Skriptunoff Oct 01 '18 at 11:59
  • It is to store information. In vb.net I'm guessing it looks like Val = { fred,etc… } But again LUA isn't something I am use to. Its out of a game. And when I go to compile it back it throws the error. I have had a go at redo it myself. But spending hours on the internet . I am unsure what …. means also what [4] means (out side of 4 part array) – Dool Cookies Oct 01 '18 at 12:01
  • 1
    Start [here](https://stackoverflow.com/q/581074/6834680). I'd recommend "Programming in Lua" book. – Egor Skriptunoff Oct 01 '18 at 13:15
  • Cheers, I'll take a look – Dool Cookies Oct 01 '18 at 13:21
  • 1
    I would recommend making this question more specific than "please restructure this". I don't know Lua, but this sounds like a "plz convert this code 4 me", and questions of that are usually closed here - we want people to make an attempt on their task before bringing it to Stack Overflow. – halfer Oct 01 '18 at 17:50
  • Are you Sure this is Lua code? Please follow Egor's recommendation and read basic syntax of Lua, your code is anything but Lua – wsha Oct 02 '18 at 04:56

0 Answers0