there is no such thing as buffer2[21]... index stops at 20 since you defined it as
➜ indexes go from 0 to 20
side note: Hello, do yourself a favour and please read How to get the best out of this forum and modify your post accordingly (include code tags).