Here is the error I get:
ava.lang.NullPointerException error executing expression Attack2 =
AttackRoll2 + " (1d20) " + LevelBonus + " (Level Bonus) + " + Ability + " (Ability Bonus) + " + WeapProf + " (Weapon Proficiency) + " + ItemEnh + " (Item Enhancement)" + if(AtkFeat != 0, " + " + AtkFeat + " (Expertise Feat)", "") + if(MiscAtk1 != 0, " + " + MiscAtk1 + " (Misc. Attack Mod)", "") + if(CA1 != 0, " + " + CA1 + " (Combat Advantage)", "") + AttackResult2
and the code:
Code: Select all
<!-- Set a few variables --!>
[H: PowerName = "Day's First Light"]
[H: PowerLevel = "Avenger Feature"]
[H: PowerType = "Encounter"]
[H: Keywords = "Divine, Implement, Radiant"]
[H: ActionType = "Standard Action"]
[H: Color = "Maroon"]
[H: Range = "Melee touch"]
[H: Ability = WisBonus]
[H: TargetDefense = "Ref"]
[H: TargetVar = "One creature"]
[H: DamageRoll1 = "1d8"]
[H: CritDamageRoll1 = "20"]
[H: DamageType = "radiant"]
[H: WeapProf = "3"]
[H: ItemEnh = "0"]
[H: AtkFeat = "0"]
[H: DmgFeat = "0"]
[H: TargetAllies = 0]
[H: TargetFoes = 1]
[H: MinRange = 1]
[H: MaxRange = 1]
[H: HitEffect = ". If the target willingly moves before the start of your next turn, it takes 5 + your Wisdom modifier (+" + Ability + ") radiant damage."]
<!-- Display attack header --!>
<table width=400 cellpadding=1>
<tr bgcolor="[R: Color]">
<td>
<font color="#FFFFFF">
<b>[R: PowerName]</b>
</font>
</td>
<td align=right>
<font color="#FFFFFF">
<b>[R: PowerLevel]</b>
</font>
</td>
</tr>
<tr>
<td>
<font color="#000000">
<b>[R: PowerType]♦[R: Keywords]</b>
</font>
</td>
</tr>
<tr>
<td>
<font color="#000000">
<b>[R: ActionType]</b>
</font>
</td>
<td align=right>
<font color="#000000">
<b>[R: Range]</b>
</font>
</td>
</tr>
<tr>
<td>
<font color="#000000">
<b>Target:</b> [R: TargetVar]
</font>
</td>
</tr>
</table>
<!-- Attack --!>
<table width=400 cellpadding=1>
<tr>
<td>
[FOR(looper, 1, Qty + 1, 1, "<br>"), CODE:
{
[H: CreateTarget1List()]
<!-- Attack Roll1 Tooltips --!>
[H: AttackRoll1 = 1d20]
[H: AttackResult1 = AttackRoll1 + LevelBonus + Ability + WeapProf + ItemEnh + AtkFeat + MiscAtk1 + CA1]
[H: Attack1 = AttackRoll1 + " (1d20) + " + LevelBonus + " (Level Bonus) + " + Ability + " (Ability Bonus) + " + WeapProf + " (Weapon Proficiency) + " + ItemEnh + " (Item Enhancement)" + if(AtkFeat != 0, " + " + AtkFeat + " (Expertise Feat)", "") + if(MiscAtk1 != 0, " + " + MiscAtk1 + " (Misc. Attack Mod)", "") + if(CA1 != 0, " + " + CA1 + " (Combat Advantage)", "")]
<!-- Attack Roll2 Tooltips --!>
[H: AttackRoll2 = 1d20]
[H: AttackResult2 = AttackRoll2 + LevelBonus + Ability + WeapProf + ItemEnh + AtkFeat + MiscAtk1 + CA1]
[H: Attack2 = <html> AttackRoll2 + " (1d20) <br>" + LevelBonus + " (Level Bonus) + " + Ability + " (Ability Bonus) + " + WeapProf + " (Weapon Proficiency) + " + ItemEnh + " (Item Enhancement)" + if(AtkFeat != 0, " + " + AtkFeat + " (Expertise Feat)", "") + if(MiscAtk1 != 0, " + " + MiscAtk1 + " (Misc. Attack Mod)", "") + if(CA1 != 0, " + " + CA1 + " (Combat Advantage)", "") + AttackResult2 </html>]
<!-- Display Tooltips --!>
<b>[R: token.name] </b>attacks <b><font color="navy">[R: Target1]</font>:</b>
<br>
<font color="navy">[t(AttackResult1): Attack1]</font> vs [R: TargetDefense]
[if(AttackRoll1 == 20), code:
{
<b><font color="red">Critical hit!</font></b><br>
};{
<br>
}]
<font color="navy">[t(AttackResult2): Attack2]</font> vs [R: TargetDefense]
[if(AttackRoll2 == 20), code:
{
<b><font color="red">Critical hit!</font></b><br>
};{
<br>
}]
<!-- Damage Roll Tooltips --!>
[H: DamageResult1 = eval(string(DamageRoll1)) + Ability + ItemEnh + ConBonus + DmgFeat + MiscDmg1]
[H: DamageRoll = DamageRoll1 + " + " + (Ability + ItemEnh + ConBonus + DmgFeat + MiscDmg1)]
[H: CritDamageResult1 = eval(string(CritDamageRoll1)) + Ability + ItemEnh + ConBonus + DmgFeat + MiscDmg1]
[H: CritDamage = CritDamageRoll1 + " + " + (Ability + ItemEnh + ConBonus + DmgFeat + MiscDmg1)]
}]
<!-- Damage --!>
<b>Hit: </b> [if(AttackRoll1 == 20 || AttackRoll2 == 20), code:
{
<font color="navy">[t(CritDamageResult1): CritDamage]</font> [R: DamageType] damage
};{
<font color="navy">[t(DamageResult1): DamageRoll]</font> [R: DamageType] damage
}]
</td>
</tr>
</table>