Code: Select all
[H, token(myID): myBooks = getMatchingProperties("book\\..*")]
Code: Select all
[h: myBooks = getMatchingProperties("book\\..*", ",", myID)]
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Code: Select all
[H, token(myID): myBooks = getMatchingProperties("book\\..*")]
Code: Select all
[h: myBooks = getMatchingProperties("book\\..*", ",", myID)]
It's run from a lib token but the data it's checking is on a non-lib token (player token).aliasmask wrote:May depend on permissions and where the macro is being run from. I'm not really sure though. Seems like it should work as is. Perhaps use [.] instead of \\. Is it a lib token? If so, use getMatchingLibProperties. There may be an internal check when passing the token id.
I've got the framework up on git, I'll get it in a working state and get a current copy. I'm in the middle of revamping something that requires me tweak a lot of the macros.wolph42 wrote:can you share the campaign file with both macro in it, so we can test.
so your macro is not trusted. Turn off (uncheck) 'allow players to edit macro' in teh macro editor.Note: This parameter can only be used in a Trusted Macro.
I unchecked it from all but the lib:test/broken macro by mistake.wolph42 wrote:ok I ran a test and it rendered the error 'three parameters were given, only two are allowed' so apparently one of the 2 is not allowed, this is not conform the wiki so either the wiki is wrong or its a bug...
edit: ah wait:so your macro is not trusted. Turn off (uncheck) 'allow players to edit macro' in teh macro editor.Note: This parameter can only be used in a Trusted Macro.
and then it renders the error: unknown token "" so something in your parameters is off.
testing that it appears that 'macro.args' is empty.
Attached version as trusted on all macros.Error in body of roll. Statement options (if any): h Statement Body : myBooks = getMatchingProperties("book\\..*", ",", myID)
I did, sorry if I don't get it.wolph42 wrote:read the rest of my post
If it was then neither version would work.testing that it appears that 'macro.args' is empty.
Code: Select all
[h: myID = getStrProp(macro.args,"myID")]
[h: assert(!(myID==''),"myID is invalid "+getMacroName()+"@"+getMacroLocation())]
Code: Select all
[H, token("Lib:MM"): myWeapons = getMatchingProperties("weapon\\..*")]
I spend so much time fiddling around with things like this when all I had to do was look down in the "See Also" section.aliasmask wrote:You really should use getMatchingLibProperties for lib tokens. I'm not sure if you can be on a different map and have that work.