Jump to content
  • 0

Countitem not detecting items..


Dolphin86

Question


  • Group:  Members
  • Topic Count:  255
  • Topics Per Day:  0.06
  • Content Count:  706
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

as title, i have all 3 items in my inventory but somehow the script did not detect my item and keep saying i dont have enough..?

Spoiler
if(countitem(40024) < 1 | countitem(40031) < 1 | countitem(40027) < 1){
	mes "^ff0000 Require";
	mes "1 Big Boulder";
	mes "1 Green Stalk";
	mes "1 Green Tree Branch ^000000";
	close3;
}
	soundeffect "menu.wav",0;
	mes "^8fce00 Require";
	mes "1 Big Boulder";
	mes "1 Green Stalk";
	mes "1 Green Tree Branch ^000000";
	next;
		switch(select("- Start Crafting: - Cancel")){
			case 1:
				mes "Crafting";
				soundeffect "gathering.wav",0;
				addtimer 11,strnpcinfo(0)+"::OnTest";
				progressbar "0x00ff00",11;
				next;
					soundeffect "menu.wav",0;
					delitem 40024, 1;
					delitem 40031, 1;
					delitem 40027, 1;
				    getitem 40030, 1;
					wep_points += 1;
					dispbottom "Gain +1 Weapon Crafting Points";
					close3;
									
			case 2:
				goto cancel;
		}

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  255
  • Topics Per Day:  0.06
  • Content Count:  706
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

if(countitem(40024) < 1 && countitem(40031) < 1 && countitem(40027) < 1){

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  103
  • Reputation:   17
  • Joined:  07/28/12
  • Last Seen:  

2 hours ago, Dolphin86 said:
if(countitem(40024) < 1 && countitem(40031) < 1 && countitem(40027) < 1){

 

if(countitem(40024) < 1 || countitem(40031) < 1 || countitem(40027) < 1){

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1537
  • Reputation:   237
  • Joined:  08/03/12
  • Last Seen:  

3 hours ago, Dolphin86 said:
if(countitem(40024) < 1 && countitem(40031) < 1 && countitem(40027) < 1){

 

should be OR ||

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
Answer this question...

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