Calculations for width are not working
Hey,
I'm currently building an own "timer meter", I'm using the "Advanced Parameters" with a Rectangle for it.
I basically have that Rectangle which should go from width 0px to 100px which repeats every 2 hours, the start and end is every uneven hour at :30, so for example one cycle goes from 1:30pm to 3:30pm:
I have the "code" built for it, but for some reason (I'm not really used to this syntax), it doesn't recognize the if statements etc.
May anyone of you who has experience, can look over it and tell me what I'm doing wrong?
Code:
calculation for even or uneven hour:
$((#DH#%2)=0?_____even_____:____uneven____)$
even:
(25+int(#Dmm#*0,84))
uneven:
calculation for before and after :30 of the hour:
(#Dmm#<30)?_____before30_____:_____after30_____)
before30:
(int(#Dmm#*0,84))
after30:
(50+int(#Dmm#*0,84))
done:
$(
(#DH#%2)=0 ?
(25+int(#Dmm#*0,84))
:
(#Dmm#<30) ?
(int(#Dmm#*0,84))
:
(50+int(#Dmm#*0,84)))
)$
$((#DH#%2)=0?(25+int(#Dmm#*0,84)):(#Dmm#<30)?(int(#Dmm#*0,84)):(50+int(#Dmm#*0,84))))$
The last line here is what I'm actually using, it should totally work when I'm understanding the syntax correctly, but this is the outcome:
edit:
Okay, so I came across a few answers about nested conditions and found varying answers, first said, you could use multiple conditionals nested, but you'd have to use square brackets "[" "]" for it to work, but it didn't work for me?
Then the other people where saying to just add up the conditions with "&&" and "||", then I did that, but now it still doesn't calculate the size:
Code:
$(#DH#%2)=1 && (#Dmm#<30)?[rw](int(#Dmm#*0,84))[/rw]$
$(#DH#%2)=1 && (#Dmm#>=30)?[rw](50+int(#Dmm#*0,84))[/rw]$
$(#DH#%2)=0?[rw](25+int(#Dmm#*0,84))[/rw]$
It does recognize which of those statements is true, but the calculation inside the [rw] brackets is still not done. Am I also not allowed to do that after a conditional statement???