eyesniper2 / skRayFall

An addon for skript that adds Citizens support, EffectLib support and other features.
https://sk.rayfall.net/
GNU General Public License v3.0
21 stars 17 forks source link

"Absolute Amount of Items" return abnormal result #58

Open ziopuzzle opened 4 years ago

ziopuzzle commented 4 years ago

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

ziopuzzle commented 3 years ago

The same problem occurs in version 1.9.25