#Money system (variable not updating)
1 messages ยท Page 1 of 1 (latest)
send "&7You have &6%{copperpickup::%%player%%}% &7bucks."
alright thank you ill try it out
ah
so now it just says
<none>
even when i pick up the copper
ok
I have never used variables:, but I think that if you use it, you are creating const variable
and you can't change it
just delete first two lines
but then wouldnt it just not work?
uhm
so
i was right ๐ญ
it didint change anything
also
i would assume variables: is correct due to it working on my other code
๐ญ
ok so I was wrong
ig
Ohh I think i know what is wrong
Should it always cancel event or should it let first one go thru
so
cancel event
should cancel the pick up of the item
so
i dont understand
what u mean
sorry
"first one"?
why do you check if {copperpickup::%player%} = 1:?
ok
so when you were debugging it, cancel event was working right?
mhm
though
i should tell you
i dont think the pick up event it getting sent
because
when i tried to send a message after that event
nothing popped up in chat or console
strange
so the event might not be valid with skript but theres no error
were you using /reload before?
ok so that's not the problem
yeah
try:
if event-item is raw copper:```
so
i didint get an error
but
i also didint get any money
variables:
{copperpickup::%player%} = 0
on pickup:
if event-item is raw copper:
add 1 to {copperpickup::%player%}
command /bal:
aliases: /money, /balance
trigger:
send "&7You have &6%{copperpickup::%%player%%}% &7bucks."
theres the entire script on more time
wait I'll try it on my server
alright
sure?
Yeah I know
thats rly stange
strange
but try it
because there is no other thing that is wrong here
for me
so add a space to add1 and remove the space for if event
variables:
{copperpickup::%player%} = 0
on pickup:
if event-item is raw copper:
add 1 to {copperpickup::%player%}
command /bal:
aliases: /money, /balance
trigger:
send "&7You have &6%{copperpickup::%%player%%}% &7bucks."
this
?
add 1 to {copperpickup::%player%} is to early
uhm im new to this so im sorry, but too early meaning add more tabs?
works but no money is given
.
wait ๐
huh
bro it doesn't work for me too
but when I'm debugging with message, it sends it
set {copperpickup::%player%} to 0
on pickup:
if event-item is raw copper:
send "a" to event-player
add 1 to {copperpickup::%event-player%}
command /bal:
aliases: /money, /balance
trigger:
send "&7You have &6%{copperpickup::%%player%%}% &7bucks."
I'm trying to somehow fix it
ok
thank u for not just telling me the code
but instead u tell me why it doesnt work
ur cool for that
set {thatvar::%player%} to {thatvar::%player%} ? 0``` here is a fairly clean solution for setting it to 0 for the first time
U gonna change your mind unfortunatly, because It was because of my first fix.... i think that your debugging line was killer, but %%player%% was the reason it was showing <none> (sorry for that)
There is your code:
set {copperpickup::%player%} to 0
on pickup:
if event-item is raw copper:
send "a" to event-player
add 1 to {copperpickup::%event-player%}
command /bal:
aliases: /money, /balance
trigger:
send "&7You have &6%{copperpickup::%player%}% &7bucks."
(there is no player in on load)
thank u
fix that on load
fix this on load to on join
or replace it with this
you could technically use on first join but this does it too for people who already joined before this working
set {copperpickup::%player%} to {copperpickup::%player%} ? 0
on pickup:
if event-item is raw copper:
send "a" to event-player
add 1 to {copperpickup::%event-player%}
command /bal:
aliases: /money, /balance
trigger:
send "&7You have &6%{copperpickup::%player%}% &7bucks."```
replace {thatvar::...} ๐
๐ญ
how
i dont knowwww
send debugging code
and your code
on join:
set {thatvar::%player%} to {thatvar::%player%} ? 0
on pickup:
if event-item is raw copper:
send "a" to event-player
add 1 to {copperpickup::%event-player%}
command /bal:
aliases: /money, /balance
trigger:
send "&7You have &6%{copperpickup::%player%}% &7bucks."
wdym
try copy this again because I have changed it
replace {thatvar::%player%}
because of this ๐
I'm on phone
I'll test it
could you send it like this in the meantime Phlip
how the frick
do i even send it
enter dont work
set {copperpickup::%player%} to {copperpickup::%player%} ? 0
on pickup:
if event-item is raw copper:
send "a" to event-player
add 1 to {copperpickup::%event-player%}
command /bal:
aliases: /money, /balance
trigger:
send "&7You have &6%{copperpickup::%player%}% &7bucks."```
oh
boom
did you try /sk reload?
yup
both?
on join:
read the code...
imm tooo lazzzzzyyy
must've right?
idk
sec
my game was invalid launcher
so i had to restart
joining rn
it did it again
๐ญ
relaunching
/bal doesn't send 0?
what host are you using?
damn
friend just hasnt bought the external host
ik
i usually
copy my skripts
make a new server
and continue coding
still 0 bucks
still no message
are you using /sk reload <name of skript>.sk or /sk reload all
name of sk
did you add this?
set {copperpickup::%player%} to {copperpickup::%player%} ? 0
on pickup:
broadcast event-item, event-item's type
if event-item's type = raw copper:
broadcast 1
add 1 to {copperpickup::%event-player%}
command /bal:
aliases: /money, /balance
trigger:
send "&7You have &6%{copperpickup::%player%}% &7bucks."```
nothing at all?
exactly
set {copperpickup::%player%} to {copperpickup::%player%} ? 0
on pickup:
broadcast event-item, event-item's type, (item of event-dropped item)
if event-item's type = raw copper:
broadcast 1
add 1 to {copperpickup::%event-player%}
command /bal:
aliases: /money, /balance
trigger:
send "&7You have &6%{copperpickup::%player%}% &7bucks."```
nothing
at
all
btw
thank u guys for ur time
i really appreciate u trying to hyelp
np, I've been on the train all day so it's a nice way to spend my time
I don't have anything else to do rn lol
ah lol
btw I have strange problem with my skript too, and I'm waiting for reply
yeah
no idea
im a beginerr
set {copperpickup::%player%} to {copperpickup::%player%} ? 0
on pickup:
broadcast event-item, event-item's type, (item of event-dropped item), event-dropped item
if event-item's type = raw copper:
broadcast 1
add 1 to {copperpickup::%event-player%}
command /bal:
aliases: /money, /balance
trigger:
send "&7You have &6%{copperpickup::%player%}% &7bucks."```
idk what half of that skript u got means
ill try
I'm clueless as to why nothing of all that broadcasts
nothing at all
can you send link to post?
It works perfectly fine for me
saend?
one mor etime
also
im using
everything
better not hear skquery or skrayfall
delete this before mods gonna see
funny that you know that as a beginner
same guy who uses spaces as indentation btw
I use spaces
i used indents
forced to use spaces
I prefer 2 spaces over tabs
by sk
@remote zodiac can you take screen shot of your scripts folder and your pasted text in file? I wanna see something
as in it adds the money too?
yea
alr
also idk what you wanna do with this but rn you can just make infinite money by continuously dropping copper
just so you know/don't forget
ik
im gonna put a cancel event after
to cancel the pickup
there
thats
the
txt
and uh
ss
that will still give you infinite money
Ok I think I know what is up
oh it will just drop back down
ok
enlighten us
I'm gonna send you code to copy
k
what
that's all
lol
and delete this
perferablky
send me the right one please
got u
I don't think that's disallowed btw dzikljan
as long as you're not harassing anyone or something similar
maybe
change it to sk
bro idk
my advice, get a new server and only then continue testing
because the code clearly works so it is just a server issue
set {copperpickup::%player%} to {copperpickup::%player%} ? 0
on pickup:
broadcast event-item, event-item's type, (item of event-dropped item), event-dropped item
if event-item's type = raw copper:
broadcast 1
add 1 to {copperpickup::%event-player%}
command /bal:
aliases: /money, /balance
trigger:
send "&7You have &6%{copperpickup::%player%}% &7bucks."
wait
actually
nvm
i feel like u might be tired of doing the convo thread ๐
so
do u want me to try and find some one else
or are u up to try and help stil
l
I can help for about another hour, then I'm finally at my destination
lol alright
i was hoping for @fresh fractal
to hop in a vc and let me ss
just incase yk
if can hop in vc too if you'd like, I just can't ss back
big red console errors
I assume that's your issue, I can't read them due to quality tho
can you copy this there?
console error
brb
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoSuchFieldError: Class org.bukkit.TreeType does not have member field 'org.bukkit.TreeType MEGA_PINE' [in thread "Server thread"]
at Skript-2.11.2 (3).jar/ch.njol.skript.bukkitutil.ItemUtils.<clinit>(ItemUtils.java:302) ~[Skript-2.11.2 (3).jar:?]
at Skript-2.11.2 (3).jar/ch.njol.skript.aliases.ItemData.aliasCopy(ItemData.java:619) ~[Skript-2.11.2 (3).jar:?]
at Skript-2.11.2 (3).jar/ch.njol.skript.aliases.ItemType.getBaseType(ItemType.java:1482) ~[Skript-2.11.2 (3).jar:?]
at Skript-2.11.2 (3).jar/ch.njol.skript.expressions.ExprTypeOf.convert(ExprTypeOf.java:50) ~[Skript-2.11.2 (3).jar:?]
at Skript-2.11.2 (3).jar/org.skriptlang.skript.lang.converter.Converters.convert(Converters.java:494) ~[Skript-2.11.2 (3).jar:?]
at Skript-2.11.2 (3).jar/org.skriptlang.skript.lang.converter.Converters.convertUnsafe(Converters.java:558) ~[Skript-2.11.2 (3).jar:?]
at Skript-2.11.2 (3).jar/ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:201) ~[Skript-2.11.2 (3).jar:?]
at Skript-2.11.2 (3).jar/ch.njol.skript.expressions.base.SimplePropertyExpression.get(SimplePropertyExpression.java:43) ~[Skript-2.11.2 (3).jar:?]
at Skript-2.11.2 (3).jar/ch.njol.skript.expressions.base.PropertyExpression.get(PropertyExpression.java:171) ~[Skript-2.11.2 (3).jar:?]
at Skript-2.11.2 (3).jar/ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:136) ~[Skript-2.11.2 (3).jar:?]
at Skript-2.11.2 (3).jar/ch.njol.skript.conditions.CondCompare.check(CondCompare.java:334) ~[Skript-2.11.2 (3).jar:?]
at Skript-2.11.2 (3).jar/ch.njol.skript.lang.Condition.run(Condition.java:83) ~[Skript-2.11.2 (3).jar:?]
... 30 more
any more wouldve been word limit
so
i think its outdated
tbh
Do you have skript from minehut library or plugin site?
ps
U sure your plugin is outdated?
send /sk info
sry
try getting a local host rq
I haven't used local host for 4 years, but I think that you need to find console starting Command
what are u using then
Titanaxe
free?
But if you don't want to install local host, you can try completly deleting skript with files
Ohhh
So try this
Then you need to Save your code
yeah just downloaded them
Damn this post is massive af
why is that there
2 min temu?
yeah
That means 2 minutes ago
and temu
Ok ok
lol I'm in Poland rn
did you load the correct code?
yes
try rejoining
please just use a local host for testing
you just download a different paper.jar
1.20.6
do u want me to just find a new host
actually wait
my friend
said she
will buy it
in 10m
yesterday
๐ญ
so il lgo ask
Build explorer for PaperMC projects. Proceed with caution!
download the 1.20.6 paper.jar from there
Oh insteresting
I only crossed the border of Poland once while hiking through mountains in Czech 2 years ago but this year I'm actually going to Poland
@remote zodiac
alr
Hiking too?
yep
Tatra Mountains?
cool
i gotta do smth rq be back in 10
Are you going to conquer the highest peak? Sorry to ask, but I'm very curious.
Ok i gonna help you
k
probably not, I'm with scouts and some are not very experienced with hiking (I'm not insanely experienced either but I've done it thrice now and pretty much know what I'm doing, I'm also quite flexible, not scared of heights and have determination), last year we were hiking in Innsbruck and it all went wrong there, 12km 12h and a lot of trouble on the way
@remote zodiac are you here?
