The map takes an argument name, not a position.
I assume we're talking about a script command here, which is then calling foo
and passing it a ScriptCommandData
object. If so, see the ScriptCommand template
member for how to define your command's argument names and template.
If you're still unsure, search the forum for argsmap
and it finds at least once example of how it's used: