Comments (5)
The error is on $2d5, as $2 could be 0 and 0d5 leads to error.
The command you want is:
!2d10;$1i.[=10]{+1d5};$2+5;"Final result: $3"
The explode operator does not support sub-operation yet. It will be possible soon to do it like this:
!2d10e10(1d5)+5
from diceparser.
2d10;$1c[=10];$2d5 this works perfect and count separatrly notmal sum and crit sum.
i want to add +5 on normal sum, not critical sum.
2d10+5 <- this one brakes in joined statement !2d10+5;$1c[=10];$2d5
from diceparser.
thank you now formula works properly
!2d10;$1c[=10];$2i:[>0]{$2d5};$1+4;"normal damage $4, critical damage $3"
however there is still problem with adding + bonus to first case. (in example above i just moved that operation to sepparate case)
!2d10+4;$1c[=10];$2i:[>0]{$2d5};$1+0;"normal damage $4, critical damage $3"
here $3 is always 0 even if 2d10 both 10
from diceparser.
it is because this can't worked: 2d10+4;$1c[=10]
in diceparser, each instruction has a result.
Diceparser manages 3 types of result: dicelist, number and string
The result type of: 2d10 is dicelist.
The result type of: 2d10+4 is number (assuming you want to roll 2 dice, sum their values and add 4.
Count operator (c) works on dicelist only. If previous result isn't dicelist, it does nothing.
from diceparser.
got it, thanks
from diceparser.
Related Issues (20)
- Macros activated from comment (#) and sentence display ("") HOT 1
- Exploding Doubles HOT 1
- No valid value at index HOT 5
- Question re: Syntax for an IF statement based on an Entered Number and a Dice Roll. HOT 2
- Bot stopped working with Discord's latest version HOT 6
- Prefix not working HOT 3
- All dice prefix commands not working HOT 3
- Diceparser not working with webhook
- DiceParser not working September 2022 HOT 1
- /r works but ! does not HOT 5
- Help Noob please! Bot Setup steps for RPG HOT 2
- Weird handling of numbers in lists
- Bot frequently does not respond
- Bot Not Responding In Any Server
- bot does not allow users below the rank of admin to roll HOT 3
- Broken example in HelpMe.md HOT 1
- List weight doesn't seem to work
- Dice Parse offline? HOT 2
- Ambiguous licensing HOT 1
- Discord bot privacy information
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diceparser.