... not passing the right values

I want to pass some variables through a function but when unpacking them only the first value persists.
The values are passed correctly through the RemoteFunction but when sent to the function something wrong happens.

I’ve tried replacing the “…” inside the function parameters with 2 variables but got the same result.
Example:

Convert ... to table.

requester.OnServerInvoke = function(player, request, ...)
   print({...})
   Monetization[request]({...})
end

It’s a little confusing, but the first argument is being sneakily consumed by a hidden parameter.

The use of colon syntax in your function definition makes the table (Monetization) the implicit first parameter. When the function is called without a colon, the table must be explicitly passed:

Monetization[request](Monetization, ...)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.