-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No valid value at index #144
Comments
Hello, I didn't test anything but by looking at your command, you aren't using the same compare method in your ifs. The first one is a i:[>=$2] (on final value of $1) where the others are comparing the threshold with each dice value |
Thx for your answer.
|
It is better to use the Switch operator instead of ifs. See the documentation: https://invent.kde.org/rolisteam/rolisteam-diceparser/-/blob/master/HelpMe.md#switch-case-s |
Hello Obiwan & folks, So, I tried the Switch/Case operator in many ways without successful full results.
Could I have any help to find what I missed, pls? |
The command is fine, There was some forgotten code on the Switch/case operator side. I just implemented it. It will be deploy soon. |
Hello,
I want to make a Discord diceParser macro for an RPG (Les héritiers).
Here is the D10 rolling dice macro:
!macro add ([0-99]+)p([0-99]+) "1d10+\1;$1i:[=1]{$1=-3}{$1};\2+7;\2-7;$1i:[>=$3]{"Critical success $2"}{i[>=\2]{"Success $2"}{i[<$4]{"Critical fail $2"}{"Fail $2"}}}" True
It return:
Could you help me to find how to resolve this issue, pls ?
The $3 and $4 syntaxes seem to be wrong but I can't find the right way.
Thx in advance
The text was updated successfully, but these errors were encountered: