I have been staring at the same bit of code for so long, I obviously need somebody to tell me the quite obvious thing that I am overlooking. I have an API routine that creates some macro's for me. Here is some code I am having problem with. var brace = "&#"+"125;", bar = "&#"+"124;"
this.MacroDetail( "➴Set-Targets1", "!edParse~ SetTargets : ?{How many Targets|One,this is one|Two, this is two}", true);
this.MacroDetail( "➴Set-Targets3", "!edParse~ SetTargets : ?{How many Targets|One,@{target"+bar+"First Target"+bar+"token_id"+brace+"|Two, this is two}", true); Note that I specify bar and brace as I do so that the API IED does not interpret the code when it loads. MacroDetail just creates a macro. Targets1 works exactly as you would expect. Targets3, does not work at all, instead, when this macro is called what arrives at the API is the following. 'SetTargets : ?{How many Targets|One,target|First Target|token_id}|Two, this is two' Notice that it is missing both @{ from after one, and is missing a } at the very end. Also notice that it does not actually process the popup asking how many targets are wanted, it just sends (most of) the text of the command it should be interpreting to the API instead of interpreting it itself. Also, (and this is something I have checked carefully), if you go look at the campaign macro's, the macro is there and looks perfect. IE: the @{ and } are there. If you copy that text to the chat window it asks for target numbers, etc. So what the heck am I doing wrong? I have read the macro's wiki carefully. I think I have followed all the instructions. I know that if I open the macro in the IED it will interpret the bar and brace, so know not to save it from there. I can't figure out what I am doing wrong. And finally, when I do paste the text of the saved macro into the chat windown, it behaves in the mannor described here <a href="https://app.roll20.net/forum/post/3668350/when-i-h" rel="nofollow">https://app.roll20.net/forum/post/3668350/when-i-h</a>... IE: it does not ask how many targets I want, and then ask me for that many targets, it asks me for all the targets, then asks how many I want reported. This is unacceptable and I need to get that issue solved as well. Any help would be greatly appreciated.