#how to fix
1 messages ยท Page 1 of 1 (latest)
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}
it literally isnt but ok
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
what do you mean
do you know what a function is, even?
where do you run the function
literally
can you send the code?
if player's offhand contains {autocomp::T1}:
woodCompress(event-player)```
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
yes
...
it still isnt working
the part that's not working.
thee whole code is working it jusst isnt doing it fast enough
?
send the code
is it working or not
it works but like in the photo it doesnt do it will all the items
send the code then
didnt I tell you to use this
.
also that is literally my code ๐
basically edited a little
worsened
it isnt i deleted your code i took insparation tho
do what I told you to do
or loop
what did u tell me to do ?
can you read what I said
all you told me to do is loop it
no
and i made the code better
what would be better
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
when you run the function
I wasn't mad
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 ?
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
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
lol
im still new to it
I recommend you read the tutorials
sovde's got good ones
https://sovdee.gitbook.io/skript-tutorials
start from here and read all of em
it's not hard
also look more about looping here:
https://skripthub.net/docs/?id=6350
Loop sections repeat their code with multiple values.
A loop will loop through all elements of the given expression, e.g. all players, worlds, items, etc. The conditions & effects inside the loop will be executed for every of those elements, which can be accessed with โloop-โ, e.g. send "hello" to loop-player. When a condition inside a loop is ...
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}```
???
WHAT ๐ญ
lol could u show me
here you want to loop 100 times
..
.
.
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}```
yes
indent tho
please
read this
please
i did
all
whats wrong with it
it works
๐ญ no
wdym no
please read this,
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}```
??
bro does not know how to skript ๐ญ
how did you get the [member] in the chat?