Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Calc Error
So I am trying to create an if statement with a calc inside. It keeps kicking an error.
***ERROR on line 12 of table 'Age of Ambition Background' - : 'Input string was not in a correct format.'. *** This is the line from the table: _{if~%pRaceNum% = 3 ? |DieHolder={Dice~1d10}||pAge={Calc~(120+(10 x 15))}|} Originally it said this: _{if~%pRaceNum% = 3 ? |DieHolder={Dice~1d10}||pAge={Calc~(120+(%DieHolder% x 15))}|} They both give the same error. So what am I missing? |
You need to use * instead of x for multiplication.
toggle quoted message
Show quoted text
_{if~%pRaceNum% = 3 ? |DieHolder={Dice~1d10}||pAge={Calc~(120+ (10*15))}|} Erol K. Bayburt ErolB1@... On 9/22/2020 1:25 AM, wooterslw@... wrote:
So I am trying to create an if statement with a calc inside. It keeps kicking an error. |
The help file says that TableSmith is case sensitive when it comes to variable names and group names & calls. But it apparently isn't case sensitive when it comes to function names. E.g. Calc, calc, and CALC all seem to work, likewise If, if, and IF.
toggle quoted message
Show quoted text
Comparisons ignore spaces, but seem to be case sensitive. three = Three evaluates as false, in an If function, while three = three evaluates as true. Erol K. Bayburt ErolB1@... On 9/23/2020 9:30 AM, sdavies2720 via groups.io wrote:
I also thought the "if" needed to be capitalized, e.g. |
to navigate to use esc to dismiss