53 posts
Location
Somewhere in ****** County, *******
Posted 09 August 2013 - 09:10 PM
I was writing a program of mine, an editor, and I have it so I can automatically insert an API function. I was wondering if there is a way to get the arguments that it may or may not need and add them, like this:
rs.setOutput(sSide, sBool)
Instead of:
rs.setOutput()
Thanks in advance.
1688 posts
Location
'MURICA
Posted 09 August 2013 - 09:34 PM
Not automatically. You'll just need to make a database of functions with the arguments needed stored as well.
53 posts
Location
Somewhere in ****** County, *******
Posted 09 August 2013 - 10:02 PM
Not automatically. You'll just need to make a database of functions with the arguments needed stored as well.
Thanks. Well this is now 1000 times harder.
8 posts
Posted 10 August 2013 - 05:16 AM
what you can do is
RSide = "right"
local function setOutput(sSide, sBool)
if sSide == nil then
rs.setOutput(RSide, 0)
else
rs.setOutput(sSide, sBool)
end
end
Thats really the best I know how to do…
997 posts
Location
Wellington, New Zealand
Posted 11 August 2013 - 08:24 AM
what you can do is
RSide = "right"
local function setOutput(sSide, sBool)
if sSide == nil then
rs.setOutput(RSide, 0)
else
rs.setOutput(sSide, sBool)
end
end
Thats really the best I know how to do…
That's not what he asked for.