Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Very simple Product Key snippet

Author
Message
RoyalBlood
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location: Stuck in this box!
Posted: 16th Apr 2009 03:23 Edited at: 16th May 2009 06:54
Here it is: Simple as can be.



AMPConcepts.webs.com
RoyalBlood
15
Years of Service
User Offline
Joined: 8th Apr 2009
Location: Stuck in this box!
Posted: 16th Apr 2009 03:24
Forgot [DBP]...oops

AMPConcepts.webs.com
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 23rd Apr 2009 02:37 Edited at: 23rd Apr 2009 02:39
eew, goto commands?
Why not doing something like


EDIT:
I hate goto commands, and so does everyone else. Im not sure why they do what they do, but its bad coding practice to use them. If you use them to much, you can wind up with dead ends, and thats no fun. I had to leave a project called snack attack because I used goto commands like a mad man, and they all stopped working. Always try to avoid them.


I wish I had access to board 17.
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 23rd Apr 2009 08:54
Really? i find the goto command pretty useful at times. Like, when my AI character dies, i delete the object, delete whatever info i have stored for that character, and use a goto command to skip to right before the next AI character is looped through. Its alot easier then putting in a bunch of "If AI character exists" kind of commands.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 23rd Apr 2009 17:09
goto can leave you with what's called "spaghetti" code, which is really hard to handle and understand.

As for the actual snippet, product keys are the types of things that are best encrypted. Simply plugging the literal product key straight into the code is a bad idea. Once one person gets it, they can tell it to everyone else, and it won't be any different.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 24th May 2009 07:56
Yeah listen to Zotoaster. Instead of using GOTO use FUNCTIONs instead. It makes for cleaner code and works just like GOTO except you can return a variable or string.



bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 25th May 2009 08:40
i always use GoSub, because you don't need global variables then

Login to post a reply

Server time is: 2024-11-22 01:44:50
Your offset time is: 2024-11-22 01:44:50