You've most likely got a wrist or hand related injury. Take a break from the game or slow down your level of playing for a bit and let it heal it up before it gets any worse. The pain is one thing, but not being able to hit patterns means your body is subconsciously stopping you from hurting yourself further.
Also, the more you play the game, and especially the higher skilled you become, the more prone you are to injuries, so just be careful not to push yourself too much. As someone who had an injury that was pretty bad, you really don't want to push it too far; it's pretty debilitating. Not only for playing the game but for regular daily life as well.