OK, sorry about that. Coding too quickly and I found a bug along the way. Here are a few notes...
1) ERROR
Regarding the error you got, I think that was because I'd used a code template I had from another script, and didn't remove a line that we didn't need. In my environment, it worked because I had the function it was referencing. I believe that I have fixed the code, and will correct the post, above, to reflect it.
2) USAGE
I should have noticed straight away that you were trying to mix targeting tokens and selected tokens... that will not work because there are no selected tokens in the message when you use a targeting statement. That said, you don't *have* to use the targeting statement to render your first ID; you could use a Fetch construction using someone's name: @(Volcano Man.token_id)
!range @(Volcano Man.token_id)
or, as a plugin
{& eval}range(@(Volcano Man.token_id){& eval}
(see the note, below, about order when you mix Plugger and Fetch)
Because you can do that, I'll leave the code the way it is, where you only have to supply one ID and it will try to supply the second from the selected token, if it is available. If you do end up using a targeting statement, then you should explicitly supply the selected ID to the command line:
!range @{target|token_id} @{selected|token_id}
3) ORDERING
For what you intended to do, this won't matter.
However, if you mix Plugger and Fetch, as I did, just above, you will want to order them explicitly. As they ship from the 1-click, they both come with the exact same priority to the ZeroFrame loop. (Run !0 in your chat and you'll see what I mean.) That means that ZeroFrame will run them in the order you installed them. In the above example, you have to have Fetch get the ID before you send the value to Plugger, so you have to make sure they are ordered that way. You can do that for this one call by including the following somewhere in your macro (just throw it in at the end):
{&0 fetch eval}
Or you can run a command like this to set the default order for all calls:
!0 fetch|45 eval|50
4) BUG
I found a separate bug while troubleshooting this, and had to release new versions of each of the metascripts (APILogic, Fetch, MathOps, Muler, Plugger, and SelectManager). ZeroFrame was unaffected by the bug. These should all get updated with tomorrow's merge to the 1-click, but if you need them before that, you can get them at my personal repo.
Get the new versions of the scripts (including the range script, above) and then give it another try. It should work for you.