License Manager Dem...
 
Notifications
Clear all

License Manager Demo - Input string was not in the correct format

6 Posts
2 Users
0 Likes
1,517 Views
(@wishfire)
Posts: 4
Active Member
Topic starter
 

Hi,

I'm trying to get the license manager demo up and get the following error:

FormatException: Input string was not in the correct format
System.Int64.Parse (System.String s) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Int64.cs:458)
Combu.Addons.LicensedUser.CheckLicense () (at Assets/CombuAddons/LicenseManager/Scripts/LicensedUser.cs:55)
Combu.Addons.LicensedUser.FromHashtable (System.Collections.Hashtable hash) (at Assets/CombuAddons/LicenseManager/Scripts/LicensedUser.cs:32)
Combu.Profile.FromJson (System.String jsonString) (at Assets/Combu/Scripts/Profile.cs:146)
Combu.User+<DoAuthenticate>c__AnonStorey5.<>m__0 (System.String text, System.String error) (at Assets/Combu/Scripts/User.cs:214)
Combu.CombuManager+<DownloadUrl>c__Iterator0.MoveNext () (at Assets/Combu/Scripts/CombuManager.cs:311)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)

What do you think I've setup wrong?  Thanks.

 
Posted : 30/07/2018 2:24 am
(@wishfire)
Posts: 4
Active Member
Topic starter
 

Hi,

In LicenseManager, IsValidLicense I changed the following:

case eLicenseType.Monthly:
// Verify that today is earlier or equal to the latest day of the licensed month and year
if (valueArray.Length >= 2 && int.TryParse(valueArray[1], out month) && int.TryParse(valueArray[0], out year))

valueArray had 3 entries and the month / year were reversed.  Now it works!  Do you think that is a system date setting with my hosting provider?

 
Posted : 30/07/2018 3:20 am
(@skaredcreations)
Posts: 801
Prominent Member Admin
 

mmh... that's strange, as long as I've made some changes in the latest versions that invalidated the previous workflow/setting. I will check at this tomorrow as soon as I'll be back at home, I'm currently away from home so I cannot check at this very moment.

I'll let you know if that was a mistake/error by me or anything else, sorry for the inconvenience.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 30/07/2018 3:44 pm
(@skaredcreations)
Posts: 801
Prominent Member Admin
 

I checked the source code and for Monthly license type it's saving MONTH-YEAR as value (for example: 7-2018), you have 3 values only for license type TIME LIMITED (format YYYY-M-D, for example: 2018-7-31).

If it's saving like "2018-7" on your server then we should debug the SQL query on your server because that's wrong, you can eventually send me your Skype ID by PM on this forum (but make sure you're using the latest version of the addon that is 1.4 [and Combu 3.1.0 possibly]).

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 31/07/2018 6:48 pm
(@wishfire)
Posts: 4
Active Member
Topic starter
 

The version of Combu is as you mention, 3.1.0, but the Asset Store is showing 1.3 as the version and not 1.4. 

Is there a pending update with the store?

 
Posted : 31/07/2018 10:57 pm
(@skaredcreations)
Posts: 801
Prominent Member Admin
 

Oh I probably forgot to send the update to Asset Store, I will send it today as soon as I'll be back at home. Anyway you can redeem your Asset Store invoice by following the link in My Downloads to access the downloads on this website too, the version 1.4 is already available in the downloads section here.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 01/08/2018 8:48 am
Share: