im trying to compare my app version with the current version using www object. it works fine on ios but giving me error in android. its weird as why this is not a problem in ios but returns error in android.
my code:
WWW Version = new WWW( "url link here");
yield return Version;
int pass = 1;
if(!string.IsNullOrEmpty(Version.error)) {
print( "Error downloading Version Number");
pass = 0;
}
if (pass == 1) {
if (CurrentVersion < int.Parse (Version.text)) {
init.InitGame ();
}
FormatException: Input string was not in the correct format
System.Int32.Parse (System.String s) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Int32.cs:629)
Make sure your Version.text string is in correct format (no letters, symbols, etc).
Also try this Convert.ToInt16(Version.text) or Convert.ToInt32(Version.text)