skRayFall icon indicating copy to clipboard operation
skRayFall copied to clipboard

"Absolute Amount of Items" return abnormal result

Open ziopuzzle opened this issue 4 years ago • 1 comments

Describe the bug

If all stack of inventory is not equal to the amount of %itemstack% to search, "absolute number of %itemstack% in %player%'s inventory" returns 0.

Steps to Reproduce

(1) Load script. (2) Clear inventory. (3) ~Place~Add 64 apple to inventory. (4) ~Place~Add 1 apple to chest. (5) Left click of apple in the chest. (6) Showed "Num: 0".

Expected Behavior

Returns 64, regardless of the amount of clicked item.

Your Script

on inventory click:
	event-inventory is not player's inventory
	set {_item} to event-item
	set {_num} to absolute number of {_item} in player's inventory
	send "==========" to player
	send "Item: %{_item}%" to player
	send "Num: %{_num}%" to player
	send "==========" to player

Screenshots / Errors

#Changed the image url to direct view. ss1 ss2 ss3

Server Information

  • Server Version and Type: Spigot 1.12.2
  • Skript Version: 2.3.6
  • skRayFall Version: 1.9.20
  • Additional Plugins: none

ziopuzzle avatar Apr 03 '20 15:04 ziopuzzle

The same problem occurs in version 1.9.25

ziopuzzle avatar Jun 16 '21 07:06 ziopuzzle