RPedit - Macro Importer/Exporter and Editor [4/19/13]
Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
I believe it's something else, specifically with eval. Drilling down to the error, I did pass by those 2 other macros you mentioned.
To isolate, I transferred in all the data retrieval calls (e.g, for indexes, macroGroups, token id etc) into selectMacroIndexes. What I'm puzzled about is that line I quoted on my previous post; it keeps throwing that prompt on all MT versions I used the isolated code on. This would certainly break execution, but with all the people using your library, it seems this problem doesn't occur. Again, just running that one line on chat will trigger the prompt, and it looks like it will trigger the prompt in any macro code that has something similar to it within.
To isolate, I transferred in all the data retrieval calls (e.g, for indexes, macroGroups, token id etc) into selectMacroIndexes. What I'm puzzled about is that line I quoted on my previous post; it keeps throwing that prompt on all MT versions I used the isolated code on. This would certainly break execution, but with all the people using your library, it seems this problem doesn't occur. Again, just running that one line on chat will trigger the prompt, and it looks like it will trigger the prompt in any macro code that has something similar to it within.
My stuff for the community:
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
So, what exactly are you doing when you get the error? Loading, Saving...?
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Loading, specifically "Macro Select". Though I believe, "All Macros" utilizes the code in question as well?
My stuff for the community:
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Well, I don't get that error with build b89. I know I have a version that had problems with certain group names, but the way you describe the problem (ie group_1 doesn't exist). Run this code against that token (impersonate it)...
And post your results here, or PM me. Be sure to put in BB <code> tags to keep formatting.
Code: Select all
[H: macroGroups = getProperty("rpe.macroGroups")]
[dialog("D"):{<pre>[R: json.indent(replace(macroGroups,"<","<"))]</pre>}
<br>
[R: encode(macroGroups)]
]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Thanks A.M. I finally found the heart of the problem and got it fixed.
Edit: just to head off confusion, the problem had to do with the actual Java code and not A.M.'s RPedit.
Edit: just to head off confusion, the problem had to do with the actual Java code and not A.M.'s RPedit.
My stuff for the community:
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
It appears that the links to graphics and such were lost during the host migration. I was able to find the files I needed, but it's difficult with the broken image links. Not sure if this is something that needs to be fixed in each post.
This may not be the place to mention it, but it feels like it's getting more difficult to find things than it used to be. I have pages of bookmarks for files that I grab each time I make a new install. It might be easier to have a file repository instead of needing to bookmark several different forum pages with links that may be on expired file hosting sites. Perhaps a DropBox account or another free system like Google Drive? I know with all the contributors its difficult to maintain a standard, but I also know that ease-of-use is one of the biggest drawbacks to using MapTools, which is a fantastically powerful system. I've been a dedicated user for many years, and it's frustrating even for me.
This may not be the place to mention it, but it feels like it's getting more difficult to find things than it used to be. I have pages of bookmarks for files that I grab each time I make a new install. It might be easier to have a file repository instead of needing to bookmark several different forum pages with links that may be on expired file hosting sites. Perhaps a DropBox account or another free system like Google Drive? I know with all the contributors its difficult to maintain a standard, but I also know that ease-of-use is one of the biggest drawbacks to using MapTools, which is a fantastically powerful system. I've been a dedicated user for many years, and it's frustrating even for me.
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Is there any chance you'll do a video on how/uses of RPEdit?
I've installed it and not really sure the best way/benefits of the tool are. I did a quick search on youtube but didnt get any hits.
Looks interesting but I'm confused on how it makes things easier is all. I'm guessing if I saw someone using it that I would find it more useful.
I've installed it and not really sure the best way/benefits of the tool are. I did a quick search on youtube but didnt get any hits.
Looks interesting but I'm confused on how it makes things easier is all. I'm guessing if I saw someone using it that I would find it more useful.
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Sure, I can do that.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
I'm having trouble finding a download link, and there's no attachments to the first two posts. Halp?
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
It's the big link on first post: http://forums.rptools.net/download/file.php?id=6771
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Was trying to use this recently and ran into a whole bunch of my lib tokens that throw the following error(s):
I guess that this is the MT id bug... but it's affecting more than 90% of my Lib files at this point and I have to copy>paste>delete old lib files to make them usable in rpedit again. :/
Etc.Error executing "getName": the token name or id "8302695660" is unknown.
Error executing "getName": the token name or id "7302695520" is unknown.
Error executing "getName": the token name or id "9302695720" is unknown.
Error executing "getName": the token name or id "7302695400" is unknown.
Error executing "getName": the token name or id "8302695620" is unknown.
Error executing "getName": the token name or id "7302695500" is unknown.
Error executing "getName": the token name or id "7302695440" is unknown.
Error executing "getName": the token name or id "7302695400" is unknown.
Error executing "getName": the token name or id "7302695460 "is unknown.
I guess that this is the MT id bug... but it's affecting more than 90% of my Lib files at this point and I have to copy>paste>delete old lib files to make them usable in rpedit again. :/
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
I'll see if I can work around the MT bug.
edit: Here's what I came up with.
Token updated below to be compatible with B91 or higher.
edit: Here's what I came up with.
Code: Select all
<!-- mtIdBugFix(id): abort()
id - id of token
This function will replace token with a copy of itself and abort if it has a bad id
-->
[H: id = arg(0)]
[H, if(length(id) != 32), code: {
[H: newId = copyToken(string(strformat("%032d",id)))]
[H, if(length(newId) == 32): removeToken(string(strformat("%032d",id)))]
[H: assert(0,"<b>Macro Aborted and token replaced with a copy<br>of itself to generate a new token id. Try again.</b>",0)]
};{}]
- Attachments
-
- Starter - RPEdit B91+ 12-20-18.rptok
- (217.5 KiB) Downloaded 54 times
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
While it's probably better to use aliasmask's method of replacing the token with the bogus ID with a copy of itself, my quick and dirty workaround is to substitute an if statement for the variable containing the ID, to force it to be a string and pad it with leading zeros. Thus:
becomes
(where id is the variable name).
This has always worked very reliably for me.
Code: Select all
[h:switchToken(id)]
Code: Select all
[h,if(isNumber(id)): switchToken(strformat("%032d", id));switchToken(id)]
This has always worked very reliably for me.
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Good to know. I was looking to do something similar with RPEdit, but there are specific uses of id in my code where I need the value over just using switchToken. It definitely can be done, but due to this being one of my early coding endeavors and the use of id 263 times in the code I found it easier to fix the token rather than fixing my code.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Yeah, I agree it's better to fix the token, but it never hurts to have a workaround. And I got to feel clever for a few minutes.
Hasn't this issue been addressed in newer versions? I haven't seen it in quite some time.
Hasn't this issue been addressed in newer versions? I haven't seen it in quite some time.