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

How would I get all the arguments as ... from a function?

Asked by
ew_001 58
3 years ago

What I'm trying to do is getting out all the arguments a function is giving me, in this case its pcall.

I'm trying to do someting like this.

local Success,... = pcall(Function,Args) -- I want all the arguments as a table or someting i can unpack.

This doesn't work because of syntax error: Expected identifier when parsing variable name, got '...'

1 answer

Log in to vote
0
Answered by
ew_001 58
3 years ago

Got answer from discord:

local Args = {pcall(Function,Args)}
Ad

Answer this question