Raised This Month: $ Target: $400
 0% 

[SOLVED] MySQL - 3 queries


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-27-2012 , 11:56   Re: MySQL - 3 queries
Reply With Quote #1

Then you'd use strings. Something like:
PHP Code:
new myNumbers[25];

fillString()
{
   new 
0len charsmax(myNumbers);
   for(
ii<=len; ++i){
      
myNumber[i] = random_num(6590);
   }

__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers

Last edited by mottzi; 07-27-2012 at 11:57.
mottzi is offline
Send a message via MSN to mottzi
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-27-2012 , 13:09   Re: MySQL - 3 queries
Reply With Quote #2

Code:
random_str(output[], len) {     for( new i = 0; i < len; i++ )     {         output[ i ] = random_num( '0', '9' );     }         output[ len ] = EOS; }

Code:
new szActivationKey[ 25 ]; random_str( szActivationKey, charsmax( szActivationKey ) ); // szActivationKey = random number string
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 07-27-2012, 13:17
T-z3P
This message has been deleted by T-z3P.
Old 07-29-2012, 16:22
T-z3P
This message has been deleted by T-z3P.
T-z3P
Senior Member
Join Date: Apr 2008
Location: Iasi, Romania
Old 07-30-2012 , 05:38   Re: MySQL - 3 queries
Reply With Quote #5

Code is working fine, but now I've got another problem. I'm getting this when I'm trying to test it.
Code:
] register [email protected] testing
Your account is now registered!
Write the next line in your console, or you will be kicked in 10 seconds:
setinfo _one testing
Unknown command: register
__________________



Last edited by T-z3P; 07-30-2012 at 05:39.
T-z3P is offline
Send a message via Yahoo to T-z3P Send a message via Skype™ to T-z3P
DjOptimuS
Senior Member
Join Date: Jan 2009
Old 07-30-2012 , 07:53   Re: MySQL - 3 queries
Reply With Quote #6

you must return PLUGIN_HANDLED

that's why you get unknown command.
DjOptimuS is offline
T-z3P
Senior Member
Join Date: Apr 2008
Location: Iasi, Romania
Old 07-30-2012 , 08:02   Re: MySQL - 3 queries
Reply With Quote #7

First, second or both functions ?
__________________


T-z3P is offline
Send a message via Yahoo to T-z3P Send a message via Skype™ to T-z3P
DjOptimuS
Senior Member
Join Date: Jan 2009
Old 07-30-2012 , 08:22   Re: MySQL - 3 queries
Reply With Quote #8

first because that is the function called by the command.
DjOptimuS is offline
T-z3P
Senior Member
Join Date: Apr 2008
Location: Iasi, Romania
Old 07-30-2012 , 08:23   Re: MySQL - 3 queries
Reply With Quote #9

Thanks
__________________


T-z3P is offline
Send a message via Yahoo to T-z3P Send a message via Skype™ to T-z3P
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode