I'd suggest you remove the Try..Catch..End Try block as long as your app is not running ok. You can use the Log() command to print variable and text field contents to check.
I don't understand why you called this thread "going from string to int". Which variable is of type int? Which of string? Please provide more code context so we can help you.
I made a small error in the code, problem solved.
thank you very much.
one thing, my English is from google translator, sorry for my way of expressing myself maybe not very clear