Alarm clock for multiple rooms

Hi, i did the Alarmclock how it is described in wiki but now i want to add other rooms…
I modified the rule but it causes errors…Is it possible to use plain c? Wich language is used in rules?

import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
import org.openhab.action.squeezebox.*
import java.util.concurrent.locks.ReentrantLock
var Timer timer1 = null
var Timer timer2 = null
var Timer timer3 = null
var java.util.concurrent.locks.ReentrantLock lock = new java.util.concurrent.locks.ReentrantLock()

rule "Wecker laden"
when
System started
then
if (SET_WECKER_1_ZeitStunde.state == Uninitialized) {
postUpdate(SET_WECKER_1_ZeitStunde, 8)
}
if (SET_WECKER_1_ZeitMinute.state == Uninitialized) {
postUpdate(SET_WECKER_1_ZeitMinute, 15)
}
if (SET_WECKER_2_ZeitStunde.state == Uninitialized) {
postUpdate(SET_WECKER_2_ZeitStunde, 8)
}
if (SET_WECKER_2_ZeitMinute.state == Uninitialized) {
postUpdate(SET_WECKER_2_ZeitMinute, 15)
}
if (SET_WECKER_3_ZeitStunde.state == Uninitialized) {
postUpdate(SET_WECKER_3_ZeitStunde, 8)
}
if (SET_WECKER_3_ZeitMinute.state == Uninitialized) {
postUpdate(SET_WECKER_3_ZeitMinute, 15)
}
end

rule "Wecker"
when
Item SET_WECKER_1_ZeitStunde changed or
Item SET_WECKER_1_ZeitMinute changed or
Item SET_WECKER_2_ZeitStunde changed or
Item SET_WECKER_2_ZeitMinute changed or
Item SET_WECKER_3_ZeitStunde changed or
Item SET_WECKER_3_ZeitMinute changed
then
lock.lock()
try {
var int weckzeit1
var int weckzeit2
var int weckzeit3
weckzeit1 = (SET_WECKER_1_ZeitStunde.state as DecimalType).intValue * 60 +
(SET_WECKER_1_ZeitMinute.state as DecimalType).intValue
weckzeit2 = (SET_WECKER_2_ZeitStunde.state as DecimalType).intValue * 60 +
(SET_WECKER_2_ZeitMinute.state as DecimalType).intValue
weckzeit3 = (SET_WECKER_3_ZeitStunde.state as DecimalType).intValue * 60 +
(SET_WECKER_3_ZeitMinute.state as DecimalType).intValue
weckzeit1 = weckzeit1.intValue
weckzeit2 = weckzeit2.intValue
weckzeit3 = weckzeit2.intValue
var int jetzt1
var int jetzt2
var int jetzt3
jetzt1 = now.getMinuteOfDay
jetzt2 = now.getMinuteOfDay
jetzt3 = now.getMinuteOfDay
jetzt1 = jetzt1.intValue
jetzt2 = jetzt2.intValue
jetzt3 = jetzt3.intValue
var int delta1
var int delta2
var int delta3
delta1 = (weckzeit1 - jetzt1)
delta2 = (weckzeit2 - jetzt2)
delta3 = (weckzeit3 - jetzt3)
delta1 = delta1.intValue
delta2 = delta2.intValue
delta3 = delta3.intValue
if (jetzt1 > weckzeit1) { delta1 = delta1 + 1440 }
if (jetzt2 > weckzeit2) { delta2 = delta2 + 1440 }
if (jetzt3 > weckzeit3) { delta3 = delta3 + 1440 }
if (timer1 != null) {
timer1.cancel
timer1 = null
}
if (timer2 != null) {
timer2.cancel
timer2 = null
}
if (timer3 != null) {
timer3.cancel
timer3 = null
}
timer1 = createTimer(now.plusMinutes(delta1)) [|
var Number day = now.getDayOfWeek
if (((day == 1) && (SET_WECKER_1_Montag.state == ON)) ||
((day == 2) && (SET_WECKER_1_Dienstag.state == ON)) ||
((day == 3) && (SET_WECKER_1_Mittwoch.state == ON)) ||
((day == 4) && (SET_WECKER_1_Donnerstag.state == ON)) ||
((day == 5) && (SET_WECKER_1_Freitag.state == ON)) ||
((day == 6) && (SET_WECKER_1_Samstag.state == ON)) ||
((day == 7) && (SET_WECKER_1_Sonntag.state == ON))) {
if (SET_WECKER_1_Licht_ein.state == ON) {
sendCommand(OG_LAMPE_AARON,“ON”)
}
if (SET_WECKER_1_Rollo_auf.state == ON) {
sendCommand(OG_ROLLO_AARON, DOWN)
}
}
timer1.reschedule(now.plusHours(24))
]
timer2 = createTimer(now.plusMinutes(delta2)) [|
var Number day = now.getDayOfWeek
if (((day == 1) && (SET_WECKER_2_Montag.state == ON)) ||
((day == 2) && (SET_WECKER_2_Dienstag.state == ON)) ||
((day == 3) && (SET_WECKER_2_Mittwoch.state == ON)) ||
((day == 4) && (SET_WECKER_2_Donnerstag.state == ON)) ||
((day == 5) && (SET_WECKER_2_Freitag.state == ON)) ||
((day == 6) && (SET_WECKER_2_Samstag.state == ON)) ||
((day == 7) && (SET_WECKER_2_Sonntag.state == ON))) {
if (SET_WECKER_2_Licht_ein.state == ON) {
sendCommand(OG_LAMPE_GAESTEZIMMER,“ON”)
}
if (SET_WECKER_2_Rollo_auf.state == ON) {
sendCommand(OG_ROLLO_GAESTEZIMMER, DOWN)
}
}
timer2.reschedule(now.plusHours(24))
]
timer3 = createTimer(now.plusMinutes(delta3)) [|
var Number day = now.getDayOfWeek
if (((day == 1) && (SET_WECKER_3_Montag.state == ON)) ||
((day == 2) && (SET_WECKER_3_Dienstag.state == ON)) ||
((day == 3) && (SET_WECKER_3_Mittwoch.state == ON)) ||
((day == 4) && (SET_WECKER_3_Donnerstag.state == ON)) ||
((day == 5) && (SET_WECKER_3_Freitag.state == ON)) ||
((day == 6) && (SET_WECKER_3_Samstag.state == ON)) ||
((day == 7) && (SET_WECKER_3_Sonntag.state == ON))) {
if (SET_WECKER_3_Licht_ein.state == ON) {
sendCommand(OG_LAMPE_SCHLAFZIMMER,“ON”)
}
if (SET_WECKER_3_Rollo_auf.state == ON) {
sendCommand(OG_ROLLO_SCHALFZIMMER, DOWN)
}
}
timer3.reschedule(now.plusHours(24))
]
} finally {
lock.unlock()
}
end

The Rules are written in a Domain Specific Language based on Xbase and bearing the most resemblance to Xtend.

It doesent work, where is the problem? I dont understand this things… Its like chinese for me…