Jump to content
MakeWebGames

Shared housing mod bug, had enough now, another one with so called support


Recommended Posts

Posted (edited)

Ok all,

I bought the below shared housing (with support) but guess what....... NO SUPPORT

The problem I have is when users move out of their partners house they lose their house!

Thanks in advance

Ben

Propose.php

Don't post paid work
Edited by Dominion
Removed a paid mod
Posted

As said above please do not post a paid modification here. If it's someone's work contact them first, and failing all else post only the small amount of code needed to fix the error.

In any case I removed all of it.

Posted (edited)

It has always been a forum rule, you just don't post the full paid code.

He can post the function he is having trouble with just not the full code page.

Yeah it may sound stupid, but when it's a paid modification you can't post it on here, due then it's free for others to use.

Anyways look over your queries, most then anything its a query that is deleting the house from the owner, when they move out.

Edited by lucky3809
Posted

OK then below is the function I believe doesnt work

function Move_Out()

{

global $data, $db, $ir, $m, $h;

if(isset($data['moved'])) {

$marriedwill = $ir['marriedwill'];

$db->query(sprintf("UPDATE users SET maxwill=marriedwill WHERE userid=%u", $ir['userid']));

$db->query(sprintf("UPDATE users SET marriedwill=0 WHERE userid=%u", $ir['userid']));

event_add($m['userid'], 'Your partner has moved out.');

echo'You have moved out.';

$h->endpage();

exit;

 

As i said above when they move out they lose their house!

Thanks

Ben

Posted

Try this, might not work:

Replace:

$db->query(sprintf("UPDATE users SET maxwill=marriedwill WHERE userid=%u", $ir['userid']));

 

With:

 

$db->query(sprintf("UPDATE users SET maxwill=100 WHERE userid=%u", $ir['userid']));

 

Replace the 100 with your default house will

Posted

That part has nothing to do with your problem it should be the part where you divorce. As for will and maxwill is just being set/updated not officially taking the house away from the user which your problem is.

Posted

Dont know how advance the mod you have, but if it works with the houses table already that comes with mccodes, then your problem is in that query that is inserting or deleting from or to the houses table. It wouldn't be the users table that is giving you the problem.... Use common sense when coding...

You said, "when users move out of their partners house they lose their house".

Look at that sentence in bold.... Now look at your php files and codes that you bought, and find the query that has the houses table in it. It is that simple. After you find that part, look at the query over and see what is missing or what went wrong...

It would be nothing to do with will, because you did not say that, you said they lose their house, house and will is two different things in mccodes...

Most then likely your problem is in the divorce function.

Posted
Dont know how advance the mod you have, but if it works with the houses table already that comes with mccodes, then your problem is in that query that is inserting or deleting from or to the houses table. It wouldn't be the users table that is giving you the problem.... Use common sense when coding...

You said, "when users move out of their partners house they lose their house".

Look at that sentence in bold.... Now look at your php files and codes that you bought, and find the query that has the houses table in it. It is that simple. After you find that part, look at the query over and see what is missing or what went wrong...

It would be nothing to do with will, because you did not say that, you said they lose their house, house and will is two different things in mccodes...

Most then likely your problem is in the divorce function.

Isn't the users house determined by their maxwill? The houses table just contains the price, will give etc. and the maxwill gives a number. If it doesn't equal to any houses' will, then they will have no house. I had this issue a while back but make sure all of your queries match up. I suggest doing what illusions has said though

Posted

Why i said houses table query, is because some people forget to add it or the query is wrong at the end where the end field is being pulled from..

such as they may have $ir['will'] or something else that may be wrong which would give them back 0 will or the will they had before being married.

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