hmm I think I found a different way by using if statements on the timers themselves. But I'm a bit confused with how the scripting works when getting the timers own value compared to another timer's value. For example:
event.getCurrentValue(); will retrieve the timer's own value in milliseconds, while
ogscript.getTimerManager().getTimer('Timer 2').getCurrent(); will retrieve the other timer's value in milliseconds.
So my question is about the event.getDisplay command. I can make a label display the current timer with the params.setValue([OID], 0, event.getDisplay()); command, since it's a string. But how do I assign ANOTHER timer's value instead? Here is a chunk of the if statement in question:
value = event.getDisplay();
self = event.getCurrentValue();
othertimer = ogscript.getTimerManager().getTimer('Timer 2').getCurrent();
if (self == 0) { // if self is zero
if (othertimer != 0) { // if other timer isnt zero, show other timer
params.setValue(0x5, 0, othertimer);} // ERROR HERE, NOT A STRING VALUE
}
So where it says params.setValue(0x5, 0, othertimer); I'm getting an error that says "Wrapped java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String " since getCurrent does not return a string value. Which is why I'm looking for an equivalent of the getDisplay command for that 'Timer 2'. Hope that makes sense?
Thanks again!
#DashBoard