Jump to content

Question

Posted

Hello rAthena, How are you.

The reason why I write is because I have a problem with a script. 

In this part of the script from an array a menu is generated with only the items you have in inventory. for later delete the selected item. The problem is that I can't find how to make the selected item in the menu was deleted.

 

post-1433-0-31377200-1466566537_thumb.png  post-1433-0-51239600-1466566536_thumb.png  post-1433-0-70772800-1466566535_thumb.png

 

Of course , if all the items in the array are present in the inventory , it works fine , but if any is missing the start , conditions are no longer the error occurs In this part of the script from an array a menu with only the items you have in inventory is generated

 

 

post-1433-0-02311300-1466566535_thumb.png

 

Thank you , I hope you can help me , because I have a few days with this problem.

 

-Van

2 answers to this question

Recommended Posts

  • 0
Posted
for ( .@c = 0; .@c < getarraysize( $@ingot ); .@c++ ) {
	if ( countitem( $@ingot[.@c] ) ) {
		.@menu$ = .@menu$ + getitemname( $@ingot[.@c] );
	}
	.@menu$ = .@menu$ + ":";
}

always append a semicolon even if the item doesn't exist in the inventory.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...