From e4716df3514b769b7ce4d1ef9a67210f3b34fe10 Mon Sep 17 00:00:00 2001 From: omltcat <6239696+omltcat@users.noreply.github.com> Date: Thu, 23 May 2024 19:07:00 -0400 Subject: [PATCH] Fix addCommand any additional arguments --- library/mission/missionCommands.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/mission/missionCommands.lua b/library/mission/missionCommands.lua index 808fe83..0cbbf60 100644 --- a/library/mission/missionCommands.lua +++ b/library/mission/missionCommands.lua @@ -38,9 +38,9 @@ missionCommands = {} ---@param name string -- The name of the command to be displayed in the F10 Other menu. ---@param path table | nil -- Defines whether the command will be in a named submenu. ---@param functionToRun function -- The function to be run. ----@param anyArguement any -- Optional. Any passed values. +---@param ... any -- Optional. Any passed values. ---@return table -- A table indicating where in the F10 menu the command resides. -function missionCommands.addCommand(name, path, functionToRun, anyArguement) end +function missionCommands.addCommand(name, path, functionToRun, ...) end ---Creates a submenu of a specified name for all players. Can be used to create nested submenus. If the path is not specified, submenu is added to the root menu.
---Function returns a table indexed numerically indicating where in the F10 menu the submenu resides.
@@ -100,9 +100,9 @@ function missionCommands.removeItem(path) end ---@param name string -- The name of the command. ---@param path table | nil -- Optional. Defines whether the command will be in a named submenu. ---@param functionToRun function -- The function to be run when the command is selected. ----@param anyArguement any -- Optional. Any argument to be passed to the function. +---@param ... any -- Optional. Any argument to be passed to the function. ---@return table -- A table indicating where in the F10 menu the command resides. -function missionCommands.addCommandForCoalition(coalition, name, path, functionToRun, anyArguement) end +function missionCommands.addCommandForCoalition(coalition, name, path, functionToRun, ...) end ---Creates a submenu of a specified name for the specified coalition. Can be used to create nested submenus. If the path is not specified, submenu is added to the root menu.
---This function returns a table indicating where in the F10 menu the submenu resides.