As mentionned before
Please follow the rules tutorial:
https://www.openhab.org/docs/tutorial/rules.html
Follow @rossko57 advice above
and you should end up with something like this
Notice the use of the code fences
rule “INIT”
when
System started
then
// Set WWALARM to off = 0
WWALARM.sendCommand(OFF)
// Calc PWWSUMME & PHEIZENSUMME
var Number num1 = PWWSUMME1.state as Number
var Number num2 = PWWSUMME2.state as Number
var Number num3 = (num2 * 1000 + num1)
PWWSUMME.postUpdate(num3)
end