#how to fix

1 messages ยท Page 1 of 1 (latest)

median eagle
#

lmao is it my code

#

send code

rose quest
#

it isnt

#

i can skript by myself now buddy

median eagle
#

yeah sure

#

send code

rose quest
#

function woodCompress(p: player):
if {_p}'s inventory contains {item::wood}:
remove 16 of {item::wood} from {_p}'s inventory
give {_p} 1 of {comp::wood}

median eagle
#

wow

#

that is literally my code ๐Ÿ˜ญ

rose quest
#

it literally isnt but ok

median eagle
#

you removed a lot of stuff though

#

anyways

#

what isnt working

rose quest
#

well like you mine but bc i made fortune work on every block and fortune is op now the payers inventory gets full and then the autocompresser wont function

#

it doesnt constantly work

median eagle
#

where do you run the fuction

#

*function

rose quest
#

what do you mean

median eagle
#

where do you run the function

#

literally

rose quest
#

yes

#

on brreak

median eagle
#

can you send the code?

rose quest
#
    if player's offhand contains {autocomp::T1}:
        woodCompress(event-player)```
median eagle
#

ok

#

so

#

sometimes it works

#

sometimes it doesn't

#

?

rose quest
#

no like i want it to alway be looking if player has the item in theree inventory

#

so if mine wood it will not take out all of the wood

median eagle
#

constantly

#

?

#

not like in on break event

rose quest
#

yes

median eagle
rose quest
#

like it doeant always look if i have it in my inventory

#

@median eagle

median eagle
rose quest
#

it still isnt working

median eagle
#

@rose quest

rose quest
#

ye sur

#

1 sec

#

like the whole code ?

median eagle
#

the part that's not working.

rose quest
#

thee whole code is working it jusst isnt doing it fast enough

median eagle
#

send the code

#

is it working or not

rose quest
# rose quest

it works but like in the photo it doesnt do it will all the items

median eagle
#

send the code then

rose quest
median eagle
median eagle
#

also that is literally my code ๐Ÿ’€

#

basically edited a little

#

worsened

rose quest
#

it isnt i deleted your code i took insparation tho

median eagle
#

"insparation"

#

inspiration

#

still wrong

median eagle
#

or loop

rose quest
#

what did u tell me to do ?

median eagle
#

can you read what I said

rose quest
#

all you told me to do is loop it

median eagle
#

no

rose quest
#

and i made the code better

median eagle
#

..?

#

read what I sent

#

the docs

rose quest
#

this

median eagle
#

yes

#

use that

#

or loop within the code

rose quest
#

what would be better

median eagle
#

depends on what you want

#

I think looping might be better

#

if u use periodical it would have to do it every x seconds or ticks and it would have to loop all players which might be bad for the performance

rose quest
#

ok thank you also hope u not that mad at me anymore

#

btw where wouldd u put the loop

median eagle
#

when you run the function

median eagle
rose quest
#

oh so we cool ?

#
    if {_p}'s inventory contains {item::wood}:
        remove 16 of {item::wood} from {_p}'s inventory
        give {_p} 1 of {comp::wood}```
#

where ?

median eagle
#

when you

#

RUN

#

the function

#

not define it

#

or you could do it in the function too

#

yeah in the function would be better

#

yeah in that code

#

loop like 100 times or something

#

cuz that would check & compress 100 times

rose quest
#

function woodCompress(p: player):
if {_p}'s inventory contains {item::wood}:
remove 16 of {item::wood} from {_p}'s inventory
give {_p} 1 of {comp::wood}
loop 100 times

median eagle
#

๐Ÿ˜ญ

#

lmao

rose quest
#

lol

median eagle
#

you do NOT know how to skript lil bro

#

like

rose quest
#

im still new to it

median eagle
#

I recommend you read the tutorials

#

sovde's got good ones

#

it's not hard

#

also look more about looping here:
https://skripthub.net/docs/?id=6350

rose quest
#

ty ssorry im still new

#
    loop function woodCompress 100 times
    if {_p}'s inventory contains {item::wood}:
        remove 16 of {item::wood} from {_p}'s inventory
        give {_p} 1 of {comp::wood}```
#

???

rose quest
#

lol could u show me

median eagle
#

here you want to loop 100 times

median eagle
#

no one's spoonfeeding here

rose quest
#

๐Ÿ˜ญ

#

a hint

median eagle
rose quest
#

it didnt really help tho

#

nvm got it]

#
    loop 100 times:
    if {_p}'s inventory contains {item::wood}:
        remove 16 of {item::wood} from {_p}'s inventory
        give {_p} 1 of {comp::wood}```
rose quest
#

i did

median eagle
#

all the tutorials?

#

or the first page

rose quest
#

all

median eagle
#

sure buddy

#

and that's what you came up with

#

sure

rose quest
#

whats wrong with it

rose quest
#

it works

median eagle
rose quest
#

wdym no

rose quest
#
loop 100 times:
    if {_p}'s inventory contains {item::wood}:
        remove 16 of {item::wood} from {_p}'s inventory
        give {_p} 1 of {comp::wood}```
#

??

median eagle
#

bro does not know how to skript ๐Ÿ˜ญ

digital bay