Concommand Arguments

I’m having trouble with getting arguments on console commands,

Can you have more than one argument?

Example


mycommand arg1 arg2


concommand.Add("mycommand", function(ply)
  ply:SetNWInt( arg1, tonumber( arg2 ) ) --Where does arg1 and arg2 come from?
end)

Yes, you can have as many arguments as you need.



concommand.Add("mycommand", function(ply, cmd, args)
	//ply is obviously the player who used the command.
	//cmd is the command
	//args is a table of all typed after the command.
	local arg1 = args[1]
	local arg1 = string.Trim(arg1)
	
	local arg2 = args[2]
	local arg2 = string.Trim(arg2)
	
	ply:SetNWInt(arg1, tonumber(arg2))
end)

//so if you use this command in your console, and type like: mycommand points 100
//it would set the Networked Integer "points" to 100, where points is arg1 and 100 is arg2


Thanks