Ketho / vscode-wow-api

VS Code extension for World of Warcraft AddOns
https://marketplace.visualstudio.com/items?itemName=ketho.wow-api
MIT License
143 stars 31 forks source link

Invalid arguments #42

Closed mrbuds closed 2 years ago

mrbuds commented 2 years ago
local unitLoadFrame = CreateFrame("FRAME");
unitLoadFrame:RegisterUnitEvent("UNIT_FLAGS", "player");

RegisterUnitEvent => the function received at least 4 arguments, but got 3.

    local bg = bar:CreateTexture(nil, "ARTWORK")
    bg:SetSnapToPixelGrid(false)

SetSnapToPixelGrid => The function received a maximum of 1 arguments, but got 2.

wiki say it has no arg but it's use with false in blizzard code like at https://github.com/Gethe/wow-ui-source/blob/d390b8491460485729248ca2cedbee0e43ee75f7/Interface/SharedXML/NineSlice.lua#L189 or https://github.com/Gethe/wow-ui-source/blob/6afa01a5eeda40242adb956f385cfe408e7bbae6/Interface/AddOns/Blizzard_NamePlates/Blizzard_ClassNameplateBar_DeathKnight.lua#L39

local mask = CreateFrame("ScrollFrame", nil, borderframe);
local content = CreateFrame("Frame", nil, mask);
mask:SetScrollChild(content);

SetScrollChild => The function received a maximum of 1 arguments, but got 2.

(global) SmoothStatusBarMixin: unknown

(method) EditBox:SetCountInvisibleLetters() => The function received a maximum of 1 arguments, but got 2.

Ketho commented 2 years ago

Hmm mixins are not supported at all, or at least I'm not sure how I would approach it. Would you prefer just to mark them global or have the mixin itself annotated? Although the Mixin() function itself is annoying but should be posssible to implement in emmylua.