#My Skript Line isnt doing its thing, Pls help asap

1 messages · Page 1 of 1 (latest)

lunar lotus
#

A couple hours ago, my skript was doing Just Fine, But then all of a sudden, I try my skript again, and all of a sudden it Just breaks.

It isnt working now, and I cant fix it, somebody pls help me, this is what im using (my code) :

on fish:
if player's tool is fishing rod named "&6&lCod Rod T1":
if fish state = caught fish:
chance of 100%
set item of fishing caught entity to (raw cod named "&6&lCod")
play sound "minecraft:block.note_block.pling" with volume 10 and pitch 5 to player

#

pls help 😭

#

i rlly need this skript working

verbal wraith
#

okay

#
  1. Please actually explain your issue.
  • "isnt doing its thing", "Just breaks", and "It isnt working now" doesnt actually tell us what the issue is.
  • you said it was a specific line? can you maybe tell us which line?
  1. Use code blocks
  • ```code here```
  1. have you tried debugging? I'm pretty sure I know the issue, but if you've debugged you should know the line it fails.
lunar lotus
#

hi, ok so my issue is, that when I fish, with a cod rod t1, It would give me a cod, thats named :&6&lCod, so after I was done with the skript, It saved it and reloaded it, it was working perfectly fine, until today, like 3 hours ago when it just stopped working, when I fished, It just gave me regular fishing loot, but the problem is that when i reload it, there is no error message, so I have 0 Idea whats going on

#
    if player's tool is fishing rod named "&6&lCod Rod T1":
        if fish state = caught fish:
            chance of 100%
            set item of fishing caught entity to (raw cod named "&6&lCod")
            play sound "minecraft:block.note_block.pling" with volume 10 and pitch 5 to player```
verbal wraith
#

"so I have 0 Idea whats going on"
That's where debugging comes in. After debugging, you should realise the issue is line 2

lunar lotus
#

I Just started skript so I dont rlly have much knowledge on stuff

verbal wraith
lunar lotus
#

bro, wth does all this mean

verbal wraith
#

which part?

lunar lotus
#

everything...

#

I dont understand this stuf

#

stuff*

verbal wraith
#

are you looking at the debugging page?

lunar lotus
#

yeah

verbal wraith
#

the condition fails because the item has changed

#

it is no longer equal to fishing rod named "&6&lCod Rod T1"

lunar lotus
#

can You explain what the means to me?

#

that*

verbal wraith
#

the durability is changed

verbal wraith
#

you are comparing an item with 34/64 durability to an item with 64/64 durability

lunar lotus
#

how

#

how DO i change the durability to 64/64

verbal wraith
#

you dont

lunar lotus
#

so my code is just cooked?

verbal wraith
#

you can

  • make the item unbreakable, so it will never lose durability
  • check only for the name of the item
  • or, best option, add a custom NBT tag
lunar lotus
#

how DO i make it just check for the name of the item

#

anything I need to change?

verbal wraith
#

literally just check the name of it

lunar lotus
#

Thats what I did

#

if players tool is fishing rod named "&6&lCod Rod T1"

verbal wraith
#

your current code isnt checking the name.
its checking the name and everything else.

#

youre also checking if its a fishing rod for example

lunar lotus
#

How do i make it not check everything else

#

any thing I need to change?

verbal wraith
lunar lotus
#

like?

#

any hint?

verbal wraith
#

line 2

lunar lotus
#

ik its line 2

#

but I dont see anything wrong with it

verbal wraith
#

you are checking player's tool against fishing rod named "&6&lCod Rod T1"

#

the right side has only the stuff specified in the line

lunar lotus
#

so I remove players tool?

verbal wraith
#

no...

#

let me type

lunar lotus
#

fishing rod named

#

?

verbal wraith
#

stop guessing

lunar lotus
#

ok

#

mb

verbal wraith
#

you want to check the name of player's tool

lunar lotus
#

it works1

#

ty

#

appreciate it

verbal wraith
lunar lotus
#

ok

#

ty

opaque spindle
#
    if fish state = CAUGHT_FISH:
        set item of fishing caught entity to Glowing conduit named "§7&lCommon Fish" with lore "&b- &cTrade this with the Villager !"
        cancel event
        chance of 3%:
            set item of fishing caught entity to Glowing pufferfish named "§d&lEpic Fish" with lore "&b- &cTrade this with the Villager !"
            cancel event
            stop
        chance of 75%:
            set item of fishing caught entity to Glowing leather boots named "&7garbage"
            cancel event
            stop
        chance of 1%:
            set item of fishing caught entity to Glowing dragon egg named "§cL§6e§eg§ae§3n§9d§5e§cr§6y §aF§3i§9s§5h" with lore "&b- &cTrade this with the Villager !"
            broadcast {@legendery-broadcast}
            cancel event
            stop
    ```
#

if fish state = caught_fish

#

the problem is here

teal falcon
# opaque spindle if fish state = caught_fish

you can only use = when declaring a variable in variables:, otherwise you want to use is.
For example:

    {cool_variable} = "cool"

on fish:
    if {cool_variable} is "cool":
        # Do stuff!!!```
#

or if you're doing x >= y or x <= y

verbal wraith
#

thats incorrect

teal falcon
#

i could've sworn it was

#

i remember it coming up somewhere in my scripts 😭