Hello, im working on a fishing skript, and seem to be running into a very small issue. Im making a gui i place the fish in, and it will detect the fish that i added in and will add the correct amount of money. But i want the gui to pickup on the custom fish and not a normal fish you get by fishing. I have the fish called "Common Herring", and when i place it in the gui and click the diamond, it says its not a fish. But i have it setup to check for the common herring and it says its not the correct thing. Ill post the code and a sample of what is happening. If anyone might know whats going on, please let me know ASAP.
Thanks!
~Matt
Skript version:
2.4
Server version.
1.14.4
Code:
Video:
https://gyazo.com/0d1af89dc668a57f536554a8eb79404a
It says i can only send fish, but i am sending fish. I even have it in the sample video. I even tried named colored "Common Herring"
[doublepost=1582047430,1581914648][/doublepost]bump
[doublepost=1582132293][/doublepost]Ok, so i know it has to do with this line here. I was looking way more into this, and this is the line thats not making it work i think.
Thanks!
~Matt
Skript version:
2.4
Server version.
1.14.4
Code:
Code:
function fisherman(P: player):
open chest with 4 rows named "&bMr. Boatwright" to {_P}
set {temp::%{_P}%} to true
set {_a} to 0
set {sell::%{_P}%} to 0
format gui slot 27, 28, 29, 30, 32, 33 and 34 of {_P} with green stained glass pane named ""
format gui slot 35 of {_P} with diamond named "&aSell" to run:
set {_a} to amount of raw cod named "Common Herring" in {_P}'s current inventory
add ({_a} * 10.00) to balance of {_P}
add ({_a} * 10.00) to {_m}
if {_P}'s current inventory contains raw cod named "Common Herring":
send "&b[Mr. Boatwright] &7You sold all your fish for &a$%{_m}%" to {_P}
close {_P}'s inventory
else:
set {_num} to 0
loop 27 times:
set slot {_num} of {_P}'s current inventory to air
add 1 to {_num}
send "&b[Mr. Boatwright] &7You can only send fish here!" to {_P}
while {temp::%{_P}%} is true:
set {_a} to amount of raw cod named "Common Herring" in {_P}'s current inventory
set {_m} to {_a} * 10.00
format gui slot 31 of {_P} with emerald named "&aSell for: &a$&a%{_m}%" with lore "&bAmount of fish: %{_a}%"
wait 1 ticks
https://gyazo.com/0d1af89dc668a57f536554a8eb79404a
It says i can only send fish, but i am sending fish. I even have it in the sample video. I even tried named colored "Common Herring"
[doublepost=1582047430,1581914648][/doublepost]bump
[doublepost=1582132293][/doublepost]Ok, so i know it has to do with this line here. I was looking way more into this, and this is the line thats not making it work i think.
Code:
if {_P}'s current inventory contains raw cod named "Common Herring":