Space Engineers

Space Engineers

Easy Automation V2.0
Davetiger 2 Mar, 2021 @ 8:45pm
Help
Can't get this crap to work
@Variables {
PistonStart = 0
RotorCurrentRotation = Current angle of MyRotor
}

@StartDrill{
WriteLine to DaveLCD = "Rotation at: \RotorCurrentRotation"
Velocity of TestPiston01 = 1.0
Velocity of TestPiston02 = 1.0
WriteLine to DaveLCD = "right before when"
When Current angle of MyRotor > 355
WriteLine to DaveLCD = "AFTER WHEN"
if UpperLimit of TestPiston01 > 9 {
PistonStart = math(UpperLimit of TestPiston02 + 1)
UpperLimit of TestPiston02 = PistonStart
WriteLine to DaveLCD = "Piston2 Moving \PistonStart"
} Else {
if UpperLimit of TestPiston01 < 10 {
PistonStart = math(UpperLimit of TestPiston01 + 1)
UpperLimit of TestPiston01 = PistonStart
WriteLine to DaveLCD = "1st Else Ran"
}
}
WriteLine to DaveLCD = "Past Both Ifs \PistonStart"
Delay 1000
if OnOff of BlockLight12 = On{
@StartDrill
} Else {
UpperLimit of TestPiston01 = 0
UpperLimit of TestPiston02 = 0
Retract (TestPistons)
WriteLine to DaveLCD = "Project Terminated"
}
}

Keep getting error that I'm missing a { after an IF and I have looked until my eyes bleed and there isn't one missing that I can see
Last edited by Davetiger; 2 Mar, 2021 @ 9:20pm