开云体育

Math problem


 

开云体育

Hey folks,

?

Happy New Year.

?

I am having a very odd problem with some code. The math is not working, and for some reason, sometimes a ‘0’ total comes out red. I am unsure if TS can’t handle positives and negatives or if some unwanted ‘absolute value’ thing is creeping in. Does anyone have any ideas?

?

?

---

%Roll1%,0

%Roll2%,0

%Roll3%,0

%Roll4%,0

%Roll5%,0

%RollT%,0

?

:Start

1,/[b/]Perversion/Chaste: /[/b/]? ??|Roll1={Dice~1d10-5}|?? {If~%Roll1%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll1%}} {CR~}

_/[b/]No Value/Value Life: /[/b/] |Roll2={Dice~1d10-5}|?? {If~%Roll2%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll2%}}{CR~}

_/[b/]Cruelty/Humane: /[/b/]???? ??|Roll3={Dice~1d10-5}|?? {If~%Roll3%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll3%}}{CR~}

_/[b/]Revenge/Mercy: /[/b/]?????? ?|Roll4={Dice~1d10-5}|?? {If~%Roll4%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll4%}}{CR~}

_/[b/]Greed/Generous: /[/b/]????? ?|Roll5={Dice~1d10-5}|?? {If~%Roll5%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll5%}}{CR~}

_/[b/]Total Morality: /[/b/]????? ???|RollT={Calc~%Roll1%+%Roll2%+%Roll3%+%Roll4%+%Roll5%}|{If~%RollT%<0?{Color~Red,%RollT%}/{Color~Blue,%RollT%}}{CR~}

?

[b]Perversion/Chaste: [/b] -2
[b]No Value/Value LIfe: [/b] 4
[b]Cruelty/Humane: [/b] -2
[b]Revenge/Mercy: [/b] -2
[b]Greed/Generous: [/b] -2
[b]Total Morality: [/b] -5

?

[b]Perversion/Chaste: [/b] -4
[b]No Value/Value LIfe: [/b] -4
[b]Cruelty/Humane: [/b] 0
[b]Revenge/Mercy: [/b] 4
[b]Greed/Generous: [/b] -4
[b]Total Morality: [/b] -2

?

Scott

?


 

开云体育

Figures I see the problem. The color red does not have the right variable. Well, still, Happy New Year.

?

Scott

?

From: [email protected] <[email protected]> On Behalf Of scott2of5@...
Sent: Wednesday, January 19, 2022 10:39
To: [email protected]
Subject: [TableSmith] Math problem

?

Hey folks,

?

Happy New Year.

?

I am having a very odd problem with some code. The math is not working, and for some reason, sometimes a ‘0’ total comes out red. I am unsure if TS can’t handle positives and negatives or if some unwanted ‘absolute value’ thing is creeping in. Does anyone have any ideas?

?

?

---

%Roll1%,0

%Roll2%,0

%Roll3%,0

%Roll4%,0

%Roll5%,0

%RollT%,0

?

:Start

1,/[b/]Perversion/Chaste: /[/b/]? ??|Roll1={Dice~1d10-5}|?? {If~%Roll1%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll1%}} {CR~}

_/[b/]No Value/Value Life: /[/b/] |Roll2={Dice~1d10-5}|?? {If~%Roll2%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll2%}}{CR~}

_/[b/]Cruelty/Humane: /[/b/]???? ??|Roll3={Dice~1d10-5}|?? {If~%Roll3%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll3%}}{CR~}

_/[b/]Revenge/Mercy: /[/b/]?????? ?|Roll4={Dice~1d10-5}|?? {If~%Roll4%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll4%}}{CR~}

_/[b/]Greed/Generous: /[/b/]????? ?|Roll5={Dice~1d10-5}|?? {If~%Roll5%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll5%}}{CR~}

_/[b/]Total Morality: /[/b/]????? ???|RollT={Calc~%Roll1%+%Roll2%+%Roll3%+%Roll4%+%Roll5%}|{If~%RollT%<0?{Color~Red,%RollT%}/{Color~Blue,%RollT%}}{CR~}

?

[b]Perversion/Chaste: [/b] -2
[b]No Value/Value LIfe: [/b] 4
[b]Cruelty/Humane: [/b] -2
[b]Revenge/Mercy: [/b] -2
[b]Greed/Generous: [/b] -2
[b]Total Morality: [/b] -5

?

[b]Perversion/Chaste: [/b] -4
[b]No Value/Value LIfe: [/b] -4
[b]Cruelty/Humane: [/b] 0
[b]Revenge/Mercy: [/b] 4
[b]Greed/Generous: [/b] -4
[b]Total Morality: [/b] -2

?

Scott

?


 

The only thing I see is

{If~%Roll2%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll2%}}

Looks like it should be

{If~%Roll2%<0?{Color~Red,%Roll2%}/{Color~Blue,%Roll2%}}

Red is call Roll1 for every roll, not just 1.

On Wed, Jan 19, 2022 at 10:39 AM <scott2of5@...> wrote:

Hey folks,

?

Happy New Year.

?

I am having a very odd problem with some code. The math is not working, and for some reason, sometimes a ‘0’ total comes out red. I am unsure if TS can’t handle positives and negatives or if some unwanted ‘absolute value’ thing is creeping in. Does anyone have any ideas?

?

?

---

%Roll1%,0

%Roll2%,0

%Roll3%,0

%Roll4%,0

%Roll5%,0

%RollT%,0

?

:Start

1,/[b/]Perversion/Chaste: /[/b/]? ??|Roll1={Dice~1d10-5}|?? {If~%Roll1%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll1%}} {CR~}

_/[b/]No Value/Value Life: /[/b/] |Roll2={Dice~1d10-5}|?? {If~%Roll2%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll2%}}{CR~}

_/[b/]Cruelty/Humane: /[/b/]???? ??|Roll3={Dice~1d10-5}|?? {If~%Roll3%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll3%}}{CR~}

_/[b/]Revenge/Mercy: /[/b/]?????? ?|Roll4={Dice~1d10-5}|?? {If~%Roll4%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll4%}}{CR~}

_/[b/]Greed/Generous: /[/b/]????? ?|Roll5={Dice~1d10-5}|?? {If~%Roll5%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll5%}}{CR~}

_/[b/]Total Morality: /[/b/]????? ???|RollT={Calc~%Roll1%+%Roll2%+%Roll3%+%Roll4%+%Roll5%}|{If~%RollT%<0?{Color~Red,%RollT%}/{Color~Blue,%RollT%}}{CR~}

?

[b]Perversion/Chaste: [/b] -2
[b]No Value/Value LIfe: [/b] 4
[b]Cruelty/Humane: [/b] -2
[b]Revenge/Mercy: [/b] -2
[b]Greed/Generous: [/b] -2
[b]Total Morality: [/b] -5

?

[b]Perversion/Chaste: [/b] -4
[b]No Value/Value LIfe: [/b] -4
[b]Cruelty/Humane: [/b] 0
[b]Revenge/Mercy: [/b] 4
[b]Greed/Generous: [/b] -4
[b]Total Morality: [/b] -2

?

Scott

?


 

开云体育

You are awesome, thanks.

?

Scott

?

?

From: [email protected] <[email protected]> On Behalf Of Andrew Oswald
Sent: Wednesday, January 19, 2022 10:52
To: [email protected]
Subject: Re: [TableSmith] Math problem

?

The only thing I see is

?

{If~%Roll2%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll2%}}

?

Looks like it should be

?

{If~%Roll2%<0?{Color~Red,%Roll2%}/{Color~Blue,%Roll2%}}

?

Red is call Roll1 for every roll, not just 1.

?

On Wed, Jan 19, 2022 at 10:39 AM <scott2of5@...> wrote:

Hey folks,

?

Happy New Year.

?

I am having a very odd problem with some code. The math is not working, and for some reason, sometimes a ‘0’ total comes out red. I am unsure if TS can’t handle positives and negatives or if some unwanted ‘absolute value’ thing is creeping in. Does anyone have any ideas?

?

?

---

%Roll1%,0

%Roll2%,0

%Roll3%,0

%Roll4%,0

%Roll5%,0

%RollT%,0

?

:Start

1,/[b/]Perversion/Chaste: /[/b/]? ??|Roll1={Dice~1d10-5}|?? {If~%Roll1%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll1%}} {CR~}

_/[b/]No Value/Value Life: /[/b/] |Roll2={Dice~1d10-5}|?? {If~%Roll2%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll2%}}{CR~}

_/[b/]Cruelty/Humane: /[/b/]???? ??|Roll3={Dice~1d10-5}|?? {If~%Roll3%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll3%}}{CR~}

_/[b/]Revenge/Mercy: /[/b/]?????? ?|Roll4={Dice~1d10-5}|?? {If~%Roll4%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll4%}}{CR~}

_/[b/]Greed/Generous: /[/b/]????? ?|Roll5={Dice~1d10-5}|?? {If~%Roll5%<0?{Color~Red,%Roll1%}/{Color~Blue,%Roll5%}}{CR~}

_/[b/]Total Morality: /[/b/]????? ???|RollT={Calc~%Roll1%+%Roll2%+%Roll3%+%Roll4%+%Roll5%}|{If~%RollT%<0?{Color~Red,%RollT%}/{Color~Blue,%RollT%}}{CR~}

?

[b]Perversion/Chaste: [/b] -2
[b]No Value/Value LIfe: [/b] 4
[b]Cruelty/Humane: [/b] -2
[b]Revenge/Mercy: [/b] -2
[b]Greed/Generous: [/b] -2
[b]Total Morality: [/b] -5

?

[b]Perversion/Chaste: [/b] -4
[b]No Value/Value LIfe: [/b] -4
[b]Cruelty/Humane: [/b] 0
[b]Revenge/Mercy: [/b] 4
[b]Greed/Generous: [/b] -4
[b]Total Morality: [/b] -2

?

Scott

?