The issue is related to the modulo operator which expects a binary expression of two integers.
I’d suggest reading up a little on the rules of modulo and finding a way to adjust your code. Here is an answer about this and a suggestion how to go about fixing this error.