ambiguous overload for 'operator=' in 'r[i]=((int)key)+0x....)'

You are misusing Strings. You also aren't using code tags when you post code, see the how to use this forum post at the top every section.

First off, String class is evil. You should use it as little as possible, preferably not at all. When working with strings, use cstrings (null terminated character arrays), and avoid the heinous String class; the dynamic memory allocation it involves can cause hard to debug memory issues on devices with such small amounts of memory, and the popular ways of using it tend to make that worse

It looks like you're taking an int value, trying to stuff it directly into a variable of String type... but then you read the values out of that array of strings (helpfully named "r" - name your variables in a way that helps to communicate their purpose) and convert them to strings. Why convert to a string if it already is one?

It looks to me like you meant to have r be an int datatype (which would be better programming practice), or maybe an array of chars...