Issue with Macro Code (MapTools v1.3.b89)

If you have searched the other User Creations subforums and an answer to your question has not been found, please post here!

Moderators: dorpond, trevor, Azhrei, Gamerdude

McSpazz
Cave Troll
Posts: 32
Joined: Fri Sep 09, 2016 7:37 pm

Issue with Macro Code (MapTools v1.3.b89)

Post by McSpazz »

So! My group recently moved to 5th edition, so I've been working to make new macros to replace the old ones I had for 4th edition. Seemed to be less complex...buuut, of course, it had to lead me to tearing my hair out. I've gotten the healing macro to work. I'm currently working on the macro for receiving damage and another to manage your resistances. All types of resistances saved to the token follow the format of NameResistance. HP, MaxHP, and TempHP are all on the token as well. I'm also trying to work with a limited stack size as, due to this version's launcher no longer working (at least for my group) and most of the group not wanting to manually edit anything...yeah, I have to try and do a lot with very little. I haven't really started the resistance modification macro yet, just the damage one. MapTools is telling me the error is at the start of the foreach statement. I think there's also an issue with there being too many curly braces nested within one another, but at this point I'm just trying to figure out what I'm missing. If you can figure out what the error is or even help improve what I currently have, I'd highly appreciate just about any input! Code is in the spoiler tag below!
The Code

Code: Select all

[H: resistNames = "Acid, Bludgening, Cold, Fire, Force, Lightning, Necrotic, Piercing, Poison, Psychic, Radiant, Slashing, Thunder"]
[H: checkboxes = listFormat(resistNames,"%list","check%item|0|%item Resistance|CHECK","##")]
[H: abort(input(
   "hpChange|0|Incoming Damage",
   checkboxes
))]
<!--Establish modifier. This will add or remove from end result.-->
[h:modifier = 1]
[h:rezBit = 2]
[h:rezResult = ", and is a banana."]
[H, foreach(resistName,resistNames),code:{
	<!--Get the value of resistance type and if it is checked.-->
	[r:resistName]
	[h:checker = eval("check"+resistName)]
	[r:checker]
	[H:compValue = eval(resistName+"Resistance")]
	[h,switch(compValue), code:
		case "Vulnerability": {
			[h:rezBit = if(checker == 1, -1, rezBit)]
			[h:modifier = if(checker == 1, 2 modifier)]
			[h:rezResult = if(rezBit == -1 && checker == 1, " and was vulnerable! Took double damage!", rezResult)]
		};
		case "Resistant": {
			[h:rezBit = if(rezBit > 1 && checker == 1, 1, rezBit)]
			[h:modifier = if(rezBit > 0 && checker == 1, .5, modifier)]
			[h:rezResult = if(rezBit == 1 && checker == 1, " and was resistant! Took half damage!", rezResult)]
		};
		case "Immune": {
			[h:modifier = if(rezBit == 2 && checker == 1, 0, modifier)]
		};
		<!--This last one would appear as 'Normal'. I set it as default to help prevent oddities from frakking feces up too much.-->
		default: {
			[h:rezBit = if(rezBit > 0 && checker == 1, 0, rezBit)]
			[h:modifier = if(rezBit >= 0 && checker == 1, 1, modifier)]
			[h:rezResult = if(rezBit == 0 && checker == 1, " and took full damage.", rezResult)]
		}
	]	
}]

User avatar
jackolas
Cave Troll
Posts: 28
Joined: Tue Apr 16, 2013 8:19 am
Location: Netherlands
Contact:

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by jackolas »

can't you give your group a bat file to launch maptools with a higher stack size?

i give this to my group: (open an text edit and save as .bat)

Code: Select all

set VERS=1.4.1.8-fat
start javaw -Xms512M -Xmx1400M -Xss5M -jar maptool-%VERS%.jar run
as for the code. dunno whats wrong without knowing what error you are getting (code seems k)

McSpazz
Cave Troll
Posts: 32
Joined: Fri Sep 09, 2016 7:37 pm

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by McSpazz »

Not exactly sure. I'm having trouble re-creating what I was getting last night (since I was trying to get it to work in piece meal), but the error I get with the whole thing in there is "String index out of range: 2007"

User avatar
jackolas
Cave Troll
Posts: 28
Joined: Tue Apr 16, 2013 8:19 am
Location: Netherlands
Contact:

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by jackolas »

hmm. might have found it. Remove this comment

Code: Select all

<!--This last one would appear as 'Normal'. I set it as default to help prevent oddities from frakking crud up too much.-->
You can't add comments before the { only after

Learned this myself the hard way :P

McSpazz
Cave Troll
Posts: 32
Joined: Fri Sep 09, 2016 7:37 pm

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by McSpazz »

Good news: fixed the overflow. Bad news Still getting an error:

   Error in body of roll.       Statement options (if any): H, foreach(resistName,resistNames),code       Statement Body (first 200 characters): { [r:resistName] [h:checker = eval("check"+resistName)] [r:checker] [H:compValue = eval("Resistance"+resistName)]

McSpazz
Cave Troll
Posts: 32
Joined: Fri Sep 09, 2016 7:37 pm

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by McSpazz »

Still no idea as to what's causing this. If anyone has another idea as to how I can get this macro done, I'm listening!!

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by aliasmask »

You should run through the launcher and turn on macro handling. Then go to .maptool folder and delete log.txt file. Run your macro and then look at the newly created log.txt file. It'll give a more detailed response and line where the problem is. Other than the comment in the wrong place and using single quotes, it looks fine.

McSpazz
Cave Troll
Posts: 32
Joined: Fri Sep 09, 2016 7:37 pm

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by McSpazz »

I can't use the launcher on this version because Java has outpaced it. Is there any way I can turn that on without using the launcher?

McSpazz
Cave Troll
Posts: 32
Joined: Fri Sep 09, 2016 7:37 pm

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by McSpazz »

Neeevermind! It's not available for b89. Downloaded the most recent release and tried it there. Error is still occurring. Here's the print out:

Code: Select all

2017-09-22 15:57:32,662 [macro.MacroManager:336] DEBUG - Starting macro: ImpersonateMacro----------------------------------------------------------------------------------
2017-09-22 15:57:32,662 [client.MapToolLineParser:1265] DEBUG - resistNames = "Acid, Bludgening, Cold, Fire, Force, Lightning, Necrotic, Piercing, Poison, Psychic, Radiant, Slashing, Thunder"
2017-09-22 15:57:32,663 [client.MapToolLineParser:1265] DEBUG - checkboxes = listFormat(resistNames,"%list","check%item|0|%item Resistance|CHECK","##")
2017-09-22 15:57:32,664 [client.MapToolLineParser:1265] DEBUG - abort(input(
   "hpChange|0|Incoming Damage",
   checkboxes
))
2017-09-22 15:57:34,316 [client.MapToolLineParser:1265] DEBUG - modifier = 1
2017-09-22 15:57:34,317 [client.MapToolLineParser:1265] DEBUG - rezBit = 2
2017-09-22 15:57:34,317 [client.MapToolLineParser:1265] DEBUG - rezResult = ", and is a banana."
2017-09-22 15:57:34,318 [client.MapToolLineParser:1265] DEBUG - resistNames

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by aliasmask »

That seems incomplete. For one, there's no error code. Perhaps check the general debugging checkbox as well in the launcher. You can also attach the campaign for me to look at and give me directions on how to duplicate the error.

McSpazz
Cave Troll
Posts: 32
Joined: Fri Sep 09, 2016 7:37 pm

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by McSpazz »

I'll do that! Attached is the campaign. There should be only one token on the field. All you need to do to replicate the results is to try and use the "DamageEXPERIMENTAL" macro in any capacity. It'll bring up the window, then throw an error after you hit okay. Also, if you have any ideas as to how you make the "ResistancesEXPERIMENTAL" macro set its drop down menu state to whatever resistance is set on the selected token, I'd super appreciate it. Thanks again for the offer!

PS: Any ideas or tips on the healing macro (which is currently functional) would also be super appreciated!
Attachments
testBed.cmpgn
(1.23 MiB) Downloaded 108 times

McSpazz
Cave Troll
Posts: 32
Joined: Fri Sep 09, 2016 7:37 pm

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by McSpazz »

Still try it on your machine, but this is what I get with macro handling and general debugging on:
Text Wall Ahoy!

Code: Select all

2017-09-23 17:09:17,518 [client.AppState:158] DEBUG - AppState.isSaving is false
2017-09-23 17:09:21,140 [model.Token:1069] DEBUG - Evaluating property: 'TempHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,143 [model.Token:1069] DEBUG - Evaluating property: 'TempHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,143 [model.Token:1069] DEBUG - Evaluating property: 'HP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,145 [model.Token:1069] DEBUG - Evaluating property: 'HP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,145 [model.Token:1069] DEBUG - Evaluating property: 'MaxHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,146 [model.Token:1069] DEBUG - Evaluating property: 'MaxHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,146 [model.Token:1069] DEBUG - Evaluating property: 'NumHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,146 [model.Token:1069] DEBUG - Evaluating property: 'NumHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,146 [model.Token:1069] DEBUG - Evaluating property: 'MaxHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,146 [model.Token:1069] DEBUG - Evaluating property: 'MaxHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,146 [model.Token:1069] DEBUG - Evaluating property: 'AC' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,146 [model.Token:1069] DEBUG - Evaluating property: 'AC' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,147 [model.Token:1069] DEBUG - Evaluating property: 'Ability Saves' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,147 [model.Token:1069] DEBUG - Evaluating property: 'Ability Saves' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,147 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Mod' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,148 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Mod' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,148 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Score' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,148 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Score' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,148 [model.Token:1069] DEBUG - Evaluating property: 'Initiative' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,148 [model.Token:1069] DEBUG - Evaluating property: 'Initiative' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,149 [model.Token:1069] DEBUG - Evaluating property: 'Speed' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,149 [model.Token:1069] DEBUG - Evaluating property: 'Speed' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,149 [model.Token:1069] DEBUG - Evaluating property: 'Vision' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,150 [model.Token:1069] DEBUG - Evaluating property: 'Vision' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,150 [model.Token:1069] DEBUG - Evaluating property: 'Languages' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:21,150 [model.Token:1069] DEBUG - Evaluating property: 'Languages' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:22,077 [macro.MacroManager:336] DEBUG - Starting macro: ImpersonateMacro----------------------------------------------------------------------------------
2017-09-23 17:09:22,862 [macro.MacroManager:336] DEBUG - Starting macro: ImpersonateMacro----------------------------------------------------------------------------------
2017-09-23 17:09:22,864 [client.MapToolLineParser:1265] DEBUG - resistNames = "Acid, Bludgening, Cold, Fire, Force, Lightning, Necrotic, Piercing, Poison, Psychic, Radiant, Slashing, Thunder"
2017-09-23 17:09:22,876 [client.MapToolLineParser:1265] DEBUG - checkboxes = listFormat(resistNames,"%list","check%item|0|%item Resistance|CHECK","##")
2017-09-23 17:09:22,881 [client.MapToolLineParser:1265] DEBUG - abort(input(
   "hpChange|0|Incoming Damage",
   checkboxes
))
2017-09-23 17:09:23,864 [client.MapToolLineParser:1265] DEBUG - modifier = 1
2017-09-23 17:09:23,864 [client.MapToolLineParser:1265] DEBUG - rezBit = 2
2017-09-23 17:09:23,865 [client.MapToolLineParser:1265] DEBUG - rezResult = ", and is a banana."
2017-09-23 17:09:23,867 [client.MapToolLineParser:1265] DEBUG - resistNames
2017-09-23 17:09:24,964 [model.Token:1069] DEBUG - Evaluating property: 'TempHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,964 [model.Token:1069] DEBUG - Evaluating property: 'TempHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,965 [model.Token:1069] DEBUG - Evaluating property: 'HP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,966 [model.Token:1069] DEBUG - Evaluating property: 'HP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,966 [model.Token:1069] DEBUG - Evaluating property: 'MaxHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,967 [model.Token:1069] DEBUG - Evaluating property: 'MaxHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,967 [model.Token:1069] DEBUG - Evaluating property: 'NumHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,967 [model.Token:1069] DEBUG - Evaluating property: 'NumHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,968 [model.Token:1069] DEBUG - Evaluating property: 'MaxHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,968 [model.Token:1069] DEBUG - Evaluating property: 'MaxHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,968 [model.Token:1069] DEBUG - Evaluating property: 'AC' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,968 [model.Token:1069] DEBUG - Evaluating property: 'AC' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,968 [model.Token:1069] DEBUG - Evaluating property: 'Ability Saves' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,969 [model.Token:1069] DEBUG - Evaluating property: 'Ability Saves' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,969 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Mod' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,969 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Mod' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,969 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Score' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,969 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Score' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,970 [model.Token:1069] DEBUG - Evaluating property: 'Initiative' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,970 [model.Token:1069] DEBUG - Evaluating property: 'Initiative' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,970 [model.Token:1069] DEBUG - Evaluating property: 'Speed' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,970 [model.Token:1069] DEBUG - Evaluating property: 'Speed' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,971 [model.Token:1069] DEBUG - Evaluating property: 'Vision' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,971 [model.Token:1069] DEBUG - Evaluating property: 'Vision' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,971 [model.Token:1069] DEBUG - Evaluating property: 'Languages' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:24,971 [model.Token:1069] DEBUG - Evaluating property: 'Languages' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,881 [model.Token:1069] DEBUG - Evaluating property: 'TempHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,881 [model.Token:1069] DEBUG - Evaluating property: 'TempHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,882 [model.Token:1069] DEBUG - Evaluating property: 'HP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,882 [model.Token:1069] DEBUG - Evaluating property: 'HP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,882 [model.Token:1069] DEBUG - Evaluating property: 'MaxHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,883 [model.Token:1069] DEBUG - Evaluating property: 'MaxHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,883 [model.Token:1069] DEBUG - Evaluating property: 'NumHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,884 [model.Token:1069] DEBUG - Evaluating property: 'NumHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,884 [model.Token:1069] DEBUG - Evaluating property: 'MaxHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,884 [model.Token:1069] DEBUG - Evaluating property: 'MaxHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,884 [model.Token:1069] DEBUG - Evaluating property: 'AC' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,885 [model.Token:1069] DEBUG - Evaluating property: 'AC' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,885 [model.Token:1069] DEBUG - Evaluating property: 'Ability Saves' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,885 [model.Token:1069] DEBUG - Evaluating property: 'Ability Saves' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,886 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Mod' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,886 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Mod' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,886 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Score' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,887 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Score' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,887 [model.Token:1069] DEBUG - Evaluating property: 'Initiative' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,887 [model.Token:1069] DEBUG - Evaluating property: 'Initiative' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,888 [model.Token:1069] DEBUG - Evaluating property: 'Speed' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,888 [model.Token:1069] DEBUG - Evaluating property: 'Speed' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,889 [model.Token:1069] DEBUG - Evaluating property: 'Vision' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,889 [model.Token:1069] DEBUG - Evaluating property: 'Vision' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,890 [model.Token:1069] DEBUG - Evaluating property: 'Languages' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:25,890 [model.Token:1069] DEBUG - Evaluating property: 'Languages' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,490 [model.Token:1069] DEBUG - Evaluating property: 'TempHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,491 [model.Token:1069] DEBUG - Evaluating property: 'TempHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,491 [model.Token:1069] DEBUG - Evaluating property: 'HP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,491 [model.Token:1069] DEBUG - Evaluating property: 'HP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,491 [model.Token:1069] DEBUG - Evaluating property: 'MaxHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,491 [model.Token:1069] DEBUG - Evaluating property: 'MaxHP' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,492 [model.Token:1069] DEBUG - Evaluating property: 'NumHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,492 [model.Token:1069] DEBUG - Evaluating property: 'NumHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,492 [model.Token:1069] DEBUG - Evaluating property: 'MaxHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,492 [model.Token:1069] DEBUG - Evaluating property: 'MaxHitDie' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,492 [model.Token:1069] DEBUG - Evaluating property: 'AC' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,493 [model.Token:1069] DEBUG - Evaluating property: 'AC' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,493 [model.Token:1069] DEBUG - Evaluating property: 'Ability Saves' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,493 [model.Token:1069] DEBUG - Evaluating property: 'Ability Saves' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,493 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Mod' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,494 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Mod' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,494 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Score' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,494 [model.Token:1069] DEBUG - Evaluating property: 'Attribute Score' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,494 [model.Token:1069] DEBUG - Evaluating property: 'Initiative' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,494 [model.Token:1069] DEBUG - Evaluating property: 'Initiative' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,495 [model.Token:1069] DEBUG - Evaluating property: 'Speed' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,495 [model.Token:1069] DEBUG - Evaluating property: 'Speed' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,496 [model.Token:1069] DEBUG - Evaluating property: 'Vision' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,496 [model.Token:1069] DEBUG - Evaluating property: 'Vision' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,497 [model.Token:1069] DEBUG - Evaluating property: 'Languages' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------
2017-09-23 17:09:26,497 [model.Token:1069] DEBUG - Evaluating property: 'Languages' for token Crow Call(C0A801A70EB769735E01000040280106)----------------------------------------------------------------------------------

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by aliasmask »

You had a couple of issues. First, you had nested {} 3 times. Once for foreach, once for if() and again for switch(). You can rewrite the code to use if() with in the foreach. But on that point. You have multiple checkboxes but only really account for the last checkbox checked. What you probably want is a list where you select one resist. You wouldn't need the foreach then. You also had a token property missing PiercingResist.

I'm including the updated campaign and I included a couple of diagnostic tools I use.

On a side note, looks like someone changed the error checker and it doesn't actually include to error message, go figure.
Attachments
testBed.cmpgn
(1.41 MiB) Downloaded 114 times

McSpazz
Cave Troll
Posts: 32
Joined: Fri Sep 09, 2016 7:37 pm

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by McSpazz »

Thank you so much! I'll look over the code tonight or tomorrow and make the necessary changes.

McSpazz
Cave Troll
Posts: 32
Joined: Fri Sep 09, 2016 7:37 pm

Re: Issue with Macro Code (MapTools v1.3.b89)

Post by McSpazz »

Sorry it's taken me so long to look to look this thing over. Can you describe what changes you made exactly to the damage mod? Also, it'd be super good to know if there are any bits in the code that wouldn't be compatible with a move to 1.3.b89. Thanks!

Post Reply

Return to “Requests for HELLLLP!”