¿ªÔÆÌåÓý

Re: DataSet Oddity


 

The problem is in the [Display] group. In particular in the section

_|GP={DSGet~Treasure,%Index%,GP}|
_<td align="left" valign="top">{If~%XP%=0?{Color~White,__}/%XP%}</td>
_|XP={DSGet~Treasure,%Index%,XP}|
_<td align="left" valign="top">{If~%GP%=0?{Color~White,__}/%GP%}</td>

you've swapped GP and XP in the {DSGet} functions. It needs to be

_|XP={DSGet~Treasure,%Index%,XP}|
_<td align="left" valign="top">{If~%XP%=0?{Color~White,__}/%XP%}</td>
_|GP={DSGet~Treasure,%Index%,GP}|
_<td align="left" valign="top">{If~%GP%=0?{Color~White,__}/%GP%}</td>

As an aside, is there a reason you're using
{DSAddNR~Treasure} plus a bunch of {DSSet} functions

rather than
{DSAddNR~Treasure,Item,%Item%,QTY,%QTY%,XP,%XP%,GP,%GP%,Notes,%Notes%}
?

Erol K. Bayburt
ErolB1@...

On 4/28/2021 8:28 PM, Otaku Smurf wrote:
I have just noticed that my Datasets are either not setting correctly, or not getting correctly.? Most likely, I have something off in my code and can't see it.
I've put in an "error" check.? So, the 1st 3 lines are what is being returned for addition to the dataset.? The table is the output and for some reason, "Experience" is offset by 1.
-1; 1; (A1)Scroll of 2 Wizard Spells;1;0;0
-1;2;Protection from Undead;1;1500;7500
-1;3; Potion of Extra-Healing;1;400;800
Treasure Quantity Experience Gold Value Notes
(A1)Scroll of 2 Wizard Spells 1 400 __ (L4) Tenser's Flaming Blade (GA)
(L2) Wings (7S)
Protection from Undead 1 __ 7500 __
Potion of Extra-Healing 1 1500 800 __
I've spent 2 days trying to figure this out on my own, and I am at a loss.
Thanks.

Join [email protected] to automatically receive all group messages.