Converting a string to int in arduino?

Wen you post code can you please post all of it. Most of the time when you only post a snippet the problem is elsewhere.