Is that your complete program? (can't imagine because I'm missing the end)
Is that your exact error message? (I get something else but the problem is the same)
On what line do you get that error message?
Did you check what that function does on that line (str()) ?
Look here:
http://www.freepascal.org/docs-html/rtl/system/str.htmlThe second parameter should be string.