❔ Failed to Activate License
I'm trying to make a License.key file for my program to read and to activate the license key but it's keep failing to activate the License key, if you need more detail let me know, also there is no error showing in my code so I'm at a lost.
17 Replies
would be really helpful if u dont post a image of code, either use https://paste.mod.gg/ or paste the code here so we can properly read it
BlazeBin
A tool for sharing your source code with the world!
sorry new this server. https://paste.mod.gg/cdakxrzzhpgc/0
BlazeBin - cdakxrzzhpgc
A tool for sharing your source code with the world!
no need to be sorry 😛 its just that images some times aren't as helpful as the code directly
Haha that’s true kinda have to squint to actually see the code
so where does it fail right now?
line 36?
So when I click browse button to locate my License.key file I have the username, password, License key hash and the expiry date displayed in the text box then I click activate but I get a message saying failed to activate license been stuck on that part for some time now
ok so line 36
well I would start by breaking down your if condition so you can break point
and see which is not matching
So insert a break point on line 36?
break it down first
if ( username == inputusername) etc
so that u can easily spot which one is wrong
with everything in one condition it might make it hard for u to see which one is failing
so replace line 36 with the code you provided?
sure you can do that, that is just an example so you can see if there is anything wrong with any of those
if you replace it, u would have to remove all this but I am sure you understand that
Yeah because if I don’t it’ll give off lots of error
The only thing that pops up is Hash differ
well then that is your issue
inputLicenseKeyHash is not equal to storedLicenseKeyHash
The license key that is stored inside License.key file is the license key hash that is being entered how do I fix that if it’s not equal to storesLicenseKeyHash?
well try outputting the value of both
and see
I would assume something done at string inputLicenseKeyHash = ComputeHash(inputLicenseKey); is not right or missing
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.