My code works as the example shows. But i still get an error? Anyone knows why?