-
May 19th, 2020, 19:11 #1
manager_effect.lua, processEffect() bug?
Around line 189 I've noticed this.
Code:local nEffInit = DB.getValue(nodeEffect, aEffectVarMap["nInit"].sDBField, aEffectVarMap["nInit"].vDBDefault or 0);
I ran into an edge case that complained about an error on this line and noticed this (unrelated to my issue I think).---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
May 19th, 2020, 19:47 #2
I noticed that recently. But I imagine that is why there's the "or 0" at the end - if there isn't a default in aEffectVarMap then it will use 0. I think that line is generic code for a DB.getValue for a field defined in the aEffectVarMap table. In this case there isn't a vDBDefault value for "nInit" as standard - which is covered by the "or 0" in this case. But, some other code (an extension or layered ruleset) may set a default and if it does, then the vDBDefault will be used.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
May 19th, 2020, 19:54 #3---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks