Hi Richard
Firstly I see the mods keep editing your posts
Remember to use the # button to encode the sketch samples inside CODE tags.
I'm not sure what the impact of running this over and over is, but I'd move it to inside the setup() function as it only needs to be initialised the once:
lcd.begin(16, 2);
I don't see where you're using clear() in the code you've provided to give you that error though?
Geoff