Bennyh789 Posted October 18, 2011 Share Posted October 18, 2011 (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 October 18, 2011 by Dominion Removed a paid mod Quote Link to comment Share on other sites More sharing options...
Maniak Posted October 18, 2011 Share Posted October 18, 2011 You shouldn't post the code openly on here if it is a paid modification.. Quote Link to comment Share on other sites More sharing options...
gurpreet Posted October 18, 2011 Share Posted October 18, 2011 As Maniak said don't post it all, just find the part that's messing up (the function or whatever) and post that up Quote Link to comment Share on other sites More sharing options...
Dominion Posted October 18, 2011 Share Posted October 18, 2011 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. Quote Link to comment Share on other sites More sharing options...
H4x0r666 Posted October 18, 2011 Share Posted October 18, 2011 they shud give him support then,, if not then he cant do anything else then posting it here^^ i guess thats clear. Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted October 18, 2011 Share Posted October 18, 2011 (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 October 18, 2011 by lucky3809 Quote Link to comment Share on other sites More sharing options...
Bennyh789 Posted October 19, 2011 Author Share Posted October 19, 2011 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 Quote Link to comment Share on other sites More sharing options...
gurpreet Posted October 19, 2011 Share Posted October 19, 2011 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 Quote Link to comment Share on other sites More sharing options...
Danny696 Posted October 19, 2011 Share Posted October 19, 2011 Who did you buy it from? Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted October 20, 2011 Share Posted October 20, 2011 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. Quote Link to comment Share on other sites More sharing options...
Bennyh789 Posted October 21, 2011 Author Share Posted October 21, 2011 But when you leave your partners house it still removes your house, so it must be that function and divorce function Quote Link to comment Share on other sites More sharing options...
gurpreet Posted October 21, 2011 Share Posted October 21, 2011 Then edit both? Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted October 21, 2011 Share Posted October 21, 2011 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. Quote Link to comment Share on other sites More sharing options...
Uridium Posted October 22, 2011 Share Posted October 22, 2011 You need to make the database remember who had which house before being married so when divorce occurs both move into their old properties Quote Link to comment Share on other sites More sharing options...
gurpreet Posted October 22, 2011 Share Posted October 22, 2011 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 Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted October 22, 2011 Share Posted October 22, 2011 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. 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.