Posted 15 December 2013 - 01:35 PM
Does anyone know if there is a way I can see how many arguments are being passed into a variable? Without needing to individually check each and every single argument?
I ask because currently I use that system of checking each and every variable…
But I would prefer to use the system of checking how many arguments it receives (as you do with tArgs=…)
Any information would be appreciated, thanks.
I ask because currently I use that system of checking each and every variable…
function cSend(localf,server)
if localf = nil then
print("Incorrect arguments: localname")
return
elseif server = nil then
print("Incorrect argument: servername")
return
end
...
But I would prefer to use the system of checking how many arguments it receives (as you do with tArgs=…)
if #tArgs < 1 or #tArgs > 4 then
Any information would be appreciated, thanks.