Does anyone have a half decent door opener procedure to check if it is open or closed and do the respective action...?
both me and starblaster have tried using 'GetDoors' from doorprofiles.scar but we have had no luck... this is what we have tried with no success, it just does not find the doors!!
SCAR Code:
program New;
{.include SRL/SRL.scar}
Var
Test: Array of DoorProfile;
i: Integer;
begin
Test := GetDoors;
For i := 0 to GetArrayLength(Test) do
Begin
try
Writeln('Door Profile No. '+IntToStr(i ));
Writeln('Midpoint Coords = '+IntToStr(Test[i].Midpoint.x)+ ', '+IntToStr(Test[i].Midpoint.y));
Writeln('Color = '+IntToStr(Test[i].Color));
except
Writeln('Door Not found');
end;
end;
end.
And the output:
Code:
Successfully compiled
Door Profile No. 0
Door Not found
Successfully executed
thoughts & suggestions please!!!