Assuming 'close' is a function, it should be called as:
close();
not:
(close)
In future, and now if that doesn't work you need to post your FULL code. A tiny snippet of code like that is pretty much useless when it comes to trying to debug.
I guess that averagelightLevel is a function and you are trying to compare the return value from the function:
if (averagelightLevel() >= 600)
Of course, I shouldn't have to guess.
Sorry guys, I read the read me for this catagory and it said something about short and sweet. I am trying to write some code for a automatic chicken door that will open and close depending on the light level and not rely on a real time clock with tables to operate. Please forgive my simple questions, it's my first attempt to program anything beyond a blinking light. Thanks for the help, that was the ticket!