Jump to content
MakeWebGames

Recommended Posts

Posted

heres a simple script that quantifies a users items everytime they look at their inventory, so for all intents and purposes, there items are always quantified :)

inventory.php

find

You're unable to view this code.

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

 

after it add

You're unable to view this code.

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

 

change the 74 to whatever the highest itemID you have is.

im sure that somebody could make this script more efficient, but here it is lol

the $h = 2 does absolutely nothing, i just didnt know what to put there, or if i could leave it blank :)

Posted

quantify items automatically

Holy crap, that adds up to 222 queries to a inventory pageload. Nice try, but a very inefficient script I wouldn't recommend unless you have a really inactive game.

Posted

quantify items automatically

ok so instead of that script above, what if everywhere i add items to a user i put something like this instead

 

You're unable to view this code.

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

  • 3 months later...
Posted

Re: quantify items automatically

aye friggin caramba...

please people... if you are getting errors... saying o hey i get an error on line 125 doesn't help us help you!

now this helps:

124 if(noob==0)

125 {

126 print"error no noobs present";

 

post the line that the error is said to be on, as well as the line before and after. thank you v.v

Posted

Re: quantify items automatically

well excuse me sorry i am a noob

line 125 is

}

$h->endpage();

?>

man thats really messed up when u guys pick on the noobs aint right

but haha hahahahahaha i will laugh with ya too since i am the butt of these remarks!!!!

:| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :| :|

Posted

Re: quantify items automatically

sry canibal I was irrated earlier :) no worries m8?

as for that, it means you are missing a curly brace } somewhere... I would scour your code, matching up all the curlies to find the missing one m8

Posted

Re: quantify items automatically

no worries i was too thanx will do

ok got it when you have ver 2.0 you change

 

 

$h=2;

to

$h = new headers;

but if anyone one can help me out with some other bugs i really need the

help cant state the problems until we talk thanx Mr.BOB

  • 4 months later...
  • 2 months later...
Posted

Re: [mccode] quantify items automatically

 

aye friggin caramba...

please people... if you are getting errors... saying o hey i get an error on line 125 doesn't help us help you!

now this helps:

124 if(noob==0)

125 {

126 print"error no noobs present";

 

post the line that the error is said to be on, as well as the line before and after. thank you v.v

Haha +1 for that...Needed to laugh!

  • 2 months later...
  • 2 weeks later...
  • 2 weeks later...
Posted

Re: [mccode] quantify items automatically

v2

heres a simple script that quantifies a users items everytime they look at their inventory, so for all intents and purposes, there items are always quantified :)

inventory.php

find

You're unable to view this code.

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

 

after it add

You're unable to view this code.

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

 

change the 74 to whatever the highest itemID you have is.

Posted

Re: [mccode] quantify items automatically

 

v2

heres a simple script that quantifies a users items everytime they look at their inventory, so for all intents and purposes, there items are always quantified :)

inventory.php

find

You're unable to view this code.

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

 

after it add

You're unable to view this code.

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

 

change the 74 to whatever the highest itemID you have is.

 

For v2, im sure there is no $h->menuarea();.

So they'd have to add it after require("globals.php");

Posted

Re: [mccode] quantify items automatically

 

v2

heres a simple script that quantifies a users items everytime they look at their inventory, so for all intents and purposes, there items are always quantified :)

inventory.php

find

You're unable to view this code.

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

 

after it add

You're unable to view this code.

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

 

change the 74 to whatever the highest itemID you have is.

 

For v2, im sure there is no $h->menuarea();.

So they'd have to add it after require("globals.php");

True and is it while ($i=$db->queryfetch_array($item)) anyways. I thought its $db->query fetch_array.

 

AND why post this im using the v1 version posted by seany on my v2 game and its fine..

Posted

Re: quantify items automatically

 

this also works for v2 just post it before include "globals.php";

 

You're unable to view this code.

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

 

No its post after include "globals.php"

Posted

Re: [mccode] quantify items automatically

The above V2 isn't working for me :?

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /public_html/inventory.php on line 5

Added after global.php

Any ideas?

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