Jump to content
MakeWebGames

New Houses Mod


Richard

Recommended Posts

Re: New Houses Mod [Mccodes V2]

 

worked great richard, love this mod

one other problem, I am getting this message:

You cannot add upgrades to a non-existant house.

even though the house does exist.

Im not too sure about this,

I've looked at the query, seems fine to me.

And the upgrades work on the engine I am using,

Does anyone else have this problem?

Link to comment
Share on other sites

  • Replies 139
  • Created
  • Last Reply

Top Posters In This Topic

Re: New Houses Mod [Mccodes V2]

thanks richard very well made mod

i would like to show people what houses they have

currently on the index and viewuser i have

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

would like to show what other houses they have even if they are not living in them "but ow them" is it possible?

thanks

im on msn if you would like to talk there

PS

Im asking of this as my users are telling me that they are buying houses and not seeing them in the list but just under current house

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

i tryed to make it so u can see who is renting ur house and it worked ok but i got this error Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/benan/public_html/houses.php on line 306 at he top of the page??? line 306 is while($r = mysql_fetch_assoc($houses))

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

i tryed to make it so u can see who is renting ur house and it worked ok but i got this error Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/benan/public_html/houses.php on line 306 at he top of the page??? line 306 is while($r = mysql_fetch_assoc($houses))

Dont just post the line with the error! post say 5 lines each way so post from line 301 to 311

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

<th width="25%">House name</th>

<th width="25%">Owner</th>

<th width="25%">Mood value</th>

<th width="25%">Manage</th>

</tr>';

if(!mysql_num_rows($houses))

{

echo '<tr>

<td colspan="5">You have no houses at this time, purchase one at the estate agent\'s.</td>

</tr>';

}

while($r = mysql_fetch_assoc($houses))

{

echo '<tr>

<td>'.stripslashes($r['hNAME']).'</td>

<td>.'"]'.stripslashes($r['username']).'</td>

<td>'.number_format($r['uhouseMood']).' mood bar</td>

these are the errors that go with it

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/benan/public_html/houses.php on line 49

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/benan/public_html/houses.php on line 55

this is line 44 to 60 shows that thier is an error on line 49 and 55, yet i had it working fine yesterday and it looks as if i may have everything in the right spot, any help would be appreciated :)

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

<th width="25%">House name</th>

<th width="25%">Owner</th>

<th width="25%">Mood value</th>

<th width="25%">Manage</th>

</tr>';

if(!mysql_num_rows($houses))

{

echo '<tr>

<td colspan="5">You have no houses at this time, purchase one at the estate agent\'s.</td>

</tr>';

}

while($r = mysql_fetch_assoc($houses))

{

echo '<tr>

<td>'.stripslashes($r['hNAME']).'</td>

<td>.'"]'.stripslashes($r['username']).'</td>

<td>'.number_format($r['uhouseMood']).' mood bar</td>

these are the errors that go with it

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/benan/public_html/houses.php on line 49

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/benan/public_html/houses.php on line 55

this is line 44 to 60 shows that thier is an error on line 49 and 55, yet i had it working fine yesterday and it looks as if i may have everything in the right spot, any help would be appreciated :)

Just by skimming over it i beleive you need to post the $houses query

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

i think you should fix all the bugs and remake this topic or tell ppl how to isntall it all toggetter. has its in bits with errors and without errors so i dont understand what to fix and what not to fix

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

Ive been testing this in my game and it works well the only problem ive found is that if a user is renting a house then when your daily cron runs if the player has no money then they run into $-xxx and the owner of the house still gets credited with the money.

Ill have a look into this when i have the time.

Other than that ive added the following. Based on if you move out of a house then its a hard job so your will should be zero'd same when you move into a house. So...

Find in

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Change to

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then find

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Change to

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

  • 3 weeks later...

Re: New Houses Mod [Mccodes V2]

Is there a way you can make it so that all new users automatically live in the default house when they move in? Rigth now it says on the index page that they live in the default house, but in houses.php it says you don't own any houses. If you get it?

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

Re: New Houses Mod [Mccodes V2]

Becon HOUSE UPGRADE MOD:

First open smenu.php!

Find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Under it add:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then open global_func.php

Find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Under it add:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then open staff_houses.php

Find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Under it add:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

Anyone explain why I'm getting this error when I try to create the houses in the Staff panel

QUERY ERROR: Column count doesn't match value count at row 1

Query was INSERT INTO houses VALUES(NULL, 'Test', '10000', '1000')

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

Just added the Updated Mod posted above and got

Fatal error: Call to undefined function addupgrade() in /home/thug/public_html/staff_houses.php on line 13

 

So now i'm 2 errors in the hole, think i'll be removing this mod ><

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

Doh yea i'll check that, still cant figure out my SQL prob

QUERY ERROR: Column count doesn't match value count at row 1

Query was INSERT INTO houses VALUES(NULL, 'Test', '10000', '1000')

Any ideas? Been on this awhile perhaps i have a typo somewhere..

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

QUERY ERROR: Column count doesn't match value count at row 1

Query was INSERT INTO houses VALUES(NULL, 'Test', '10000', '1000')

Again this usually measn that the SQLS on your PHPMYADMIN are not the same as those you are trying to INSERT from a script..

Check the number of tables in your PHPMYADMIN for the dbase houses..

Then check the INSERT on your script you may have one more or less than one another...

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

May sound like a stupid question, but then I dont beleive in stupid questions ^_^

I have houses under Users created, but I also have Houses as a Table. In the Table Houses I have an insert so I can add a sell price to houses, which wasn't in the script posted for this set-up.

IS IT possible that my hSELLPRICE field could be the culprit throwing all this coding off? :P

thanks for replying btw.

Link to comment
Share on other sites

Re: New Houses Mod [Mccodes V2]

Bingo, That's what it was. I erased my hSELLPRICE table and my houses are working again. phew, had me nervous i'm trying to remember which all files I went through and altered to make this work incase I had to go back, like a dummy i didnt back-up ><

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