sl23 wrote: ↑July 19th, 2024, 2:38 pm
Like combining things like above into something like this: X=([mFTotal]<1 ? 0.00001 : (([mFUsed:]/[mFTotal:]*150)+15))
Haha, yeah but I haven't used division for 35 years, or much of any other math tbh, least of all formulas. Can't even remember how to transpose them it's been so long! I used to be really good at it, trigonometry was a little tough though.
Would be good to know though, can I use conditional formulas inside a formula like I showed above?
Ah poop! Only works in the test skin!
Sorry, thought it would be the same for use in the skin I wanted it for.: X=(([m#CURRENTSECTION#:]/[m7Total:]+0.00001)*-#BarH#) This for a shape meter, hence the -#BarH#
Getting four errors still, for each disconnected disk, on every skin update!
sl23 wrote: ↑July 19th, 2024, 1:37 pm
Using this to set a shape meter, which works, but it gives four errors, why? X=([mFUsed:]/[mFTotal:]*150)+15
ERROR: Formula: Division by 0: (7911505920/0*150)+15
This topic has increased too long, maybe the solution has been posted and I missed it (most probably this is the case), but I have a feeling that we're going around the solution of the Division by 0 error message. If it has not been explicitly solved, here is a simple solution: X=([mFTotal]<1 ? 0.00001 : (([mFUsed:]/([mFTotal:]+0.000001)*150)+15)). The added small value doesn1t change the result, but help avoiding the error message.
Sorry if I resumed something already solved.
sl23 wrote: ↑July 19th, 2024, 2:38 pm
The manual doesn't give much info on formulas and what does/doesn't work inside them, as it's assumed you know what you're doing.
Doesn't even have to give info related to general math rules, which are applying all the time. You can1t divide something by 0, this is a well-known and always applicable rule.
Personally, I would write *(-#BarH#) instead. I'm not comfortable with two operations following immediately after one another, without some operation member between them.
balala wrote: ↑July 19th, 2024, 3:32 pm
Doesn't even have to give info related to general math rules, which are applying all the time. You can1t divide something by 0, this is a well-known and always applicable rule.
Yes, but I didn't know that having not used division for 35 years!
Would be good to know though, can I use conditional formulas inside a formula like I showed above?
Aha, solved it, there was a missing : in balala's code! Shape2=Rectangle 0, ([#CURRENTSECTION#Total:]<1 ? 0.00001 : (([#CURRENTSECTION#Used:]/([#CURRENTSECTION#Total:]+0.000001)*(-#BarH#)))), #BarW#, 2 | StrokeWidth 0 | Fill Color [#C[#CURRENTSECTION]]