Calling Function strings

I only know little about functions so im wondering if it would be possible to connect/call two parameters into one string, so it’d be easier to call the Function.

Function
image

Called
image

Current

Function
image

Called
image

Can you elaborate on what you mean/intend to do?

You can use the concatenation operator ..
For example: "Hello ".."World!" would be "Hello World!"

I worded the last part wrong I meant to say, calling two parameters in one call function

Currently the functions looks like this,
image

And this is what im trying to do,
image

Ok, I understand now, but wouldn’t your proposed solution work? (or am I missing something else?)


If you want to use one string, you could do something like this:

-- Example
local function index(str: string)
   local split = string.split(str, '|') -- split the string by the '|' character
   local functions = {WindowView, FunctionsSelect} -- this is assuming you still have the functions defined
   for i, name in split do -- loop through the two different name
      functions[i](name) -- call the functions with each respective name (ordered)
   end
end

index("name1|name2")

Using 1 parameter instead of two wouldn’t be much of benefit since it would make your code more complex when unneeded

in the second screenshot, at the end of your “Index” function but still inside of it, you could add these 2 lines to run the functions you define inside of it:

WindowView()
FunctionSelect()

Thanks, I feel like it looks more organized and easier to read especially for the long run.