¿ªÔÆÌåÓý

Re: Rolling until total reached


 

¿ªÔÆÌåÓý

The problem is with your

|Total=%Total%+1|

When you use = it is a Literal value and puts ¡°0+1¡± as the value. What you want is

|Total+1| or |Total={Calc~%Total%+1}|

?

Vance

?

Sent from for Windows 10

?

From: jimmyflowers1 via groups.io
Sent: Friday, February 19, 2021 3:59 AM
To: [email protected]
Subject: [TableSmith] Rolling until total reached

?

I'm trying to create a table that keeps a running total of points to spend. Once it reaches the max, it stops producing results.

Here is the structure I attempted with dummy text. When I run, the program exits (crashes). Any ideas?

#

# _Test Table

#

?

%Total%,0

?

:Start

1,[Roll]

?

:Roll

1,Rolled 1 |Total=%Total%+1|{If~%Total% != 10 ? [Roll] / End}<br>

2,Rolled 2 |Total=%Total%+1|{If~%Total% != 10 ? [Roll] / End}<br>

3,Rolled 3 |Total=%Total%+1|{If~%Total% != 10 ? [Roll] / End}<br>

4,Rolled 4 |Total=%Total%+1|{If~%Total% != 10 ? [Roll] / End}<br>

5,Rolled 5 |Total=%Total%+1|{If~%Total% != 10 ? [Roll] / End}<br>

6,Rolled 6 |Total=%Total%+1|{If~%Total% != 10 ? [Roll] / End}<br>

7,Rolled 7 |Total=%Total%+1|{If~%Total% != 10 ? [Roll] / End}<br>

8,Rolled 8 |Total=%Total%+1|{If~%Total% != 10 ? [Roll] / End}<br>

9,Rolled 9 |Total=%Total%+1|{If~%Total% != 10 ? [Roll] / End}<br>

10,Rolled 10 |Total=%Total%+1|{If~%Total% != 10 ? [Roll] / End}<br>

Some of the text in the table appears merely for testing purposes. The rolls will actually all lead to separate groups/tables so that ultimately I end up with 10 blocks of text from various other tables.

Any help is appreciated. Thanks in advance.

?

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