[GLuaBug] Variable number of arguments causes the 'arg' to be always null !

Hello all,

So I’m trying to create a crafting manager. I already just finished Inventory Management using Matrix. That works, so that’s why I’m now trying to create a crafting manager. So basicaly you have a function like :



CraftingManager = {}
function CraftingManager:RegisterCraft(resultItemID, ...)
--The code here
end


Well when you launch that, no errors, however right after you add :



/* Craft Registry */
CraftingManager:RegisterCraft(82, "54 54 54", "54 -1 54", "54 54 54")


Then the code inside the RegisterCraft function crashes due to the fact ‘arg’, which should represent the table of variable number of arguments, is always NULL. So it creates an error telling i’m trying to parse a null table !!

Is this a lua bug ? Is this a GModLua bug ?
I also do print(arg) in the first of this function and the result is : nil !!!

The magical arg local variable was deprecated in Lua 5.1. You should use the vararg expression ( “…” ).



    local arg = { ... }

    PrintTable( arg )

    print( ... )

    -- etc