$$ ?????? $$ Posted February 15, 2009 Posted February 15, 2009 Hi game coders. :-) Is their anyone who is generous enough to help me remove part of the coder from the big code below so when a user registers they'll recieve 0 bullets instead of 10. :-D $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, $cr, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); $i=$db->insert_id(); $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)"); if($_POST['ref']) { require "global_func.php"; $db->query("UPDATE users SET crystals=crystals+2 WHERE userid={$_POST['ref']}"); event_add($_POST['ref'],"For refering $username to the game, you have earnt 2 valuable Bullets!",$c); $db->query("INSERT INTO referals VALUES('', {$_POST['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$IP')"); Quote
03laceys Posted February 15, 2009 Posted February 15, 2009 Re: Any help to remove 10 bullet signup Hi game coders. :-) Is their anyone who is generous enough to help me remove part of the coder from the big code below so when a user registers they'll recieve 0 bullets instead of 10. :-D $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, $cr, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); $i=$db->insert_id(); $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)"); if($_POST['ref']) { require "global_func.php"; $db->query("UPDATE users SET crystals=crystals+2 WHERE userid={$_POST['ref']}"); event_add($_POST['ref'],"For refering $username to the game, you have earnt 2 valuable Bullets!",$c); $db->query("INSERT INTO referals VALUES('', {$_POST['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$IP')"); You have given the wrong snippit. Quote
Lithium Posted February 15, 2009 Posted February 15, 2009 Re: Any help to remove 10 bullet signup assuming bullets = crystals... come on... just open your eyes and edit it... $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, $cr, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); Quote
Dave Posted February 15, 2009 Posted February 15, 2009 Re: Any help to remove 10 bullet signup $cr hint hint. Quote
gurpreet Posted February 16, 2009 Posted February 16, 2009 Re: Any help to remove 10 bullet signup Earlier before the query you must have something like this: $cr=5; Quote
$$ ?????? $$ Posted February 16, 2009 Author Posted February 16, 2009 Re: Any help to remove 10 bullet signup Nah it isn't. :| I made a test account & when I logged in I got 10 crystals. Can any1 help me make it 0? Quote
Dave Posted February 16, 2009 Posted February 16, 2009 Re: Any help to remove 10 bullet signup just before that mysql query add. $cr=0; Quote
Lithium Posted February 16, 2009 Posted February 16, 2009 Re: Any help to remove 10 bullet signup Nah it isn't. :| I made a test account & when I logged in I got 10 crystals. Can any1 help me make it 0? As a matter of fact... It is!!! $db->query("UPDATE users SET crystals=crystals+2 WHERE userid={$_POST['ref']}"); event_add($_POST['ref'],"For refering $username to the game, you have earnt 2 valuable Bullets!",$c); Quote
$$ ?????? $$ Posted February 16, 2009 Author Posted February 16, 2009 Re: Any help to remove 10 bullet signup lol I need a proper coder to have a look not some bunch of idiots. I scanned it through & I even made 2 more accounts & they still get 10 crystals. :S think before writing in my post please ! Quote
Lithium Posted February 16, 2009 Posted February 16, 2009 Re: Any help to remove 10 bullet signup lol I need a proper coder to have a look not some bunch of idiots. I scanned it through & I even made 2 more accounts & they still get 10 crystals. :S think before writing in my post please ! It seems to me that you definetly need not a proper coder but indeed "some bunch of idiots". Every single one of us as pointed you the answer, which by the way a bunch of idiots would also be able to find. Therefore, go back to your "scanning" and tell to these bunch of idiots when you find what you need! :) Quote
$$ ?????? $$ Posted February 17, 2009 Author Posted February 17, 2009 Re: Any help to remove 10 bullet signup well if you want m,ail me & i'll give you my game link & I bet you get 10 crystals. Quote
John99 Posted February 17, 2009 Posted February 17, 2009 Re: Any help to remove 10 bullet signup You dont even need to do that i think all you have to do is in phpmyadmin default 5 ? duh Quote
$$ ?????? $$ Posted February 17, 2009 Author Posted February 17, 2009 Re: Any help to remove 10 bullet signup Cheers anyway people Tonka was the man for this job. & yes guys it was $scr but theirs like 3 of them & I could only spot 1 with my quick scan of the file. Quote
Lithium Posted February 17, 2009 Posted February 17, 2009 Re: Any help to remove 10 bullet signup Cheers anyway people Tonka was the man for this job. & yes guys it was $scr but theirs like 3 of them & I could only spot 1 with my quick scan of the file. Well it seems that the bunch of idiots were right about it after all! :) Quote
gurpreet Posted February 17, 2009 Posted February 17, 2009 Re: Any help to remove 10 bullet signup So a bunch of idiots were right. Quote
Tonka Posted February 17, 2009 Posted February 17, 2009 Re: Any help to remove 10 bullet signup Cheers anyway people Tonka was the man for this job. & yes guys it was $scr but theirs like 3 of them & I could only spot 1 with my quick scan of the file. I told him that after I fixed it for him Well it seems that the bunch of idiots were right about it after all! :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.