Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Pass arguments to a function in a table?

Asked by 6 years ago

lets look at this:

local table = {
["example key"] = function(arguments)

                end;

}

how do I pass arguments into this function using the key as a specification for that function?

0
Not sure what you're asking. You want something other than just table["example key"](args) ? aschepler 135 — 6y
0
Actually that's exactly what I needed to know. I just didn't know the syntax for passing arguments, simpler than I thought. InfiniteYield 41 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

You should change your variable name, but...

t["example key"](...)
1
it was just an example, but thanks, now i know the syntax for it. InfiniteYield 41 — 6y
0
yw Gey4Jesus69 2705 — 6y
Ad

Answer this question