i want to connect 10+ shift registers together with 2 rgb leds

Your variable called 'register' is one of the words you can't use as it is used in the system. Replace it with 'myregister' or some other none reserved word.