PDA

View Full Version : toggle_attack acting up



Nickademus
March 2nd, 2014, 00:09
This line is causing errors. At first it was only when I closed or /reloaded FG. Now it throws an error when I remove an effect action or delete a spell that has an effect action.

local bShowAttackDetail = (toggle_attack.getValue() == 1) and bShowCast;


The error message used to be that toggle_attack was a nil value. Now it is showing the .getValue as nil.

Script Error: [string "campaign/scripts/spell_action.lua"]:54: attempt to call field 'getValue' (a nil value)


To my knowledge, I do not touch any of the attack buttons or the script anywhere in the updateDisplay() function. I also think it started this before I even started making extensions. I've mostly ignored it since it only happened when I closed FG, but that could be just because it was the first time an effect action was being closed/removed.

This also happens in a fresh campaign with no extensions.

Moon Wizard
March 3rd, 2014, 23:10
Nickademus,

Can you walk me through the steps to recreate in a fresh campaign? There is some step I must be missing when I set up in a blank campaign to recreate.

Thanks,
JPG

Nickademus
March 3rd, 2014, 23:45
Hmm. I think I just...

made a campaign
created a PC
added a spell class
gave it 3 zero-level spells
created a new spell (or drug one in)
added an effect action
deleted effect action


That should pop up the error in the console. Was using PFRPG but I'll test on 3.5e.

Edit: Happens in 3.5e as well; no extensions

Moon Wizard
March 4th, 2014, 19:32
It appears to already be addressed in v3.0.3 beta, which is why I couldn't initially recreate. Thanks for the report.

Regards,
JPG

Nickademus
March 4th, 2014, 20:33
Thanks for the info.