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

  RSS
(@wishfire)
New Member Registered

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.

Quote
Posted : 30/07/2018 3:24 am
(@wishfire)
New Member Registered

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?

ReplyQuote
Posted : 30/07/2018 4:20 am
(@skaredcreations)
Honorable 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

ReplyQuote
Posted : 30/07/2018 4:44 pm
(@skaredcreations)
Honorable 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

ReplyQuote
Posted : 31/07/2018 7:48 pm
(@wishfire)
New Member Registered

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?

ReplyQuote
Posted : 31/07/2018 11:57 pm
(@skaredcreations)
Honorable 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

ReplyQuote
Posted : 01/08/2018 9:48 am
Share: