skRayFall

skRayFall

297k Downloads

"Absolute Amount of Items" return abnormal result

ziopuzzle opened this issue ยท 1 comments

commented

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) PlaceAdd 64 apple to inventory.
(4) PlaceAdd 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
commented

The same problem occurs in version 1.9.25