#Money system (variable not updating)

1 messages ยท Page 1 of 1 (latest)

remote zodiac
#

any fixes?

fresh fractal
#

send "&7You have &6%{copperpickup::%%player%%}% &7bucks."

remote zodiac
#

alright thank you ill try it out

#

ah

#

so now it just says

#

<none>

#

even when i pick up the copper

fresh fractal
#

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

remote zodiac
#

but then wouldnt it just not work?

fresh fractal
#

try it

#

idk lol

remote zodiac
#

uhm

#

so

#

i was right ๐Ÿ˜ญ

#

it didint change anything

#

also

#

i would assume variables: is correct due to it working on my other code

#

๐Ÿ˜ญ

fresh fractal
#

ok so I was wrong

remote zodiac
#

ig

fresh fractal
#

Ohh I think i know what is wrong

#

Should it always cancel event or should it let first one go thru

remote zodiac
#

so

#

cancel event

#

should cancel the pick up of the item

#

so

#

i dont understand

#

what u mean

#

sorry

#

"first one"?

fresh fractal
#

why do you check if {copperpickup::%player%} = 1:?

remote zodiac
#

ah i forgot to remove it

#

when i was debugging it

fresh fractal
#

ok

remote zodiac
#

still doesnt work though

#

after removal

fresh fractal
#

so when you were debugging it, cancel event was working right?

remote zodiac
#

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

fresh fractal
#

strange

remote zodiac
#

so the event might not be valid with skript but theres no error

fresh fractal
#

were you using /reload before?

remote zodiac
#

no

#

/sk reload

fresh fractal
#

ok so that's not the problem

remote zodiac
#

yeah

fresh fractal
#

try:

  if event-item is raw copper:```
remote zodiac
#

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

fresh fractal
#

wait I'll try it on my server

remote zodiac
#

alright

fresh fractal
#

wait wait wait

#

I think you tabs are irregular

remote zodiac
#

thats just how it showed

#

on

#

discord

fresh fractal
#

sure?

remote zodiac
#

yes ๐Ÿ˜ญ

fresh fractal
#

nah

#

there you have irregular ones too

remote zodiac
#

huh

#

how so

fresh fractal
remote zodiac
#

oh uh

#

u might be right

#

.

#

i have no errors though

fresh fractal
#

Yeah I know

#

thats rly stange

#

strange

#

but try it

#

because there is no other thing that is wrong here

#

for me

remote zodiac
#

so add a space to add1 and remove the space for if event

fresh fractal
#

nah

#

just rewrite these tabs

#

for sure

remote zodiac
#

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

#

?

fresh fractal
#

add 1 to {copperpickup::%player%} is to early

remote zodiac
#

uhm im new to this so im sorry, but too early meaning add more tabs?

fresh fractal
#

yes

#

that's more my expression

remote zodiac
#

works but no money is given

fresh fractal
#

bruh

#

wait

fresh fractal
remote zodiac
#

results

#

?

fresh fractal
#

wait ๐Ÿ˜‚

remote zodiac
#

huh

fresh fractal
#

bro it doesn't work for me too

remote zodiac
#

๐Ÿ˜ญ

#

what da frig duud

fresh fractal
#

but when I'm debugging with message, it sends it

remote zodiac
#

send my ur script

#

lemme me compare

fresh fractal
#
  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."
remote zodiac
#

ur using on load

#

๐Ÿ˜ญ

#

still doesnt tho

#

๐Ÿ˜ญ

fresh fractal
remote zodiac
#

ok ty

#

il ltry too

fresh fractal
#

yoooo

#

I think i fixed it

remote zodiac
#

no way u already fixed it

#

ive been working on this

#

for

#

5

#

h

#

๐Ÿ˜ญ

fresh fractal
#

wait

#

I'll check why it wasn't working

remote zodiac
#

ok

#

thank u for not just telling me the code

#

but instead u tell me why it doesnt work

#

ur cool for that

small hornet
#
  set {thatvar::%player%} to {thatvar::%player%} ? 0``` here is a fairly clean solution for setting it to 0 for the first time
fresh fractal
#

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."
small hornet
#

(there is no player in on load)

fresh fractal
#

wait

#

wait

remote zodiac
#

uhm

#

no argue

fresh fractal
#

fix that on load

remote zodiac
#

actua;y

#

fight

#

fight

#

fight

fresh fractal
#

fix this on load to on join

fresh fractal
#

I think it's better

small hornet
#

you could technically use on first join but this does it too for people who already joined before this working

fresh fractal
#
  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."```
remote zodiac
#

so

#

im still getting

#

<none>

small hornet
#

replace {thatvar::...} ๐Ÿ˜‰

remote zodiac
#

๐Ÿ˜ญ

fresh fractal
remote zodiac
#

i dont knowwww

small hornet
#

send debugging code

fresh fractal
#

and your code

remote zodiac
#

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."

remote zodiac
fresh fractal
small hornet
#

replace {thatvar::%player%}

fresh fractal
remote zodiac
#

none still

#

<none>

small hornet
#

send new (formatted) code

#

```
code

remote zodiac
small hornet
#

I'm on phone

fresh fractal
#

I'll test it

small hornet
remote zodiac
#

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

fresh fractal
#

lol

#

Ok

#

So I checked it

#

And it works

small hornet
#

ngl I don't see anything up with it

#

did you rejoin yet?

fresh fractal
#

did you try /sk reload?

remote zodiac
#

yup

small hornet
#

both?

remote zodiac
#

ill do it

fresh fractal
#

on join:

remote zodiac
#

shii

#

maybe u right

small hornet
remote zodiac
#

imm tooo lazzzzzyyy

fresh fractal
#

@remote zodiac

small hornet
#

must've right?

remote zodiac
#

idk

#

sec

#

my game was invalid launcher

#

so i had to restart

#

joining rn

#

it did it again

#

๐Ÿ˜ญ

#

relaunching

fresh fractal
#

wait

#

did it sent "a" to you?

remote zodiac
#

no

#

and

#

doesnt work

#

๐Ÿ’€

small hornet
#

/bal doesn't send 0?

remote zodiac
#

but

#

no money up

#

yes funny up

fresh fractal
#

I think something is up with server...

#

try restarting it

small hornet
#

event-item's type = raw copper

#

try that

#

also broadcast event-iten

remote zodiac
#

restarting

#

gimme a sec

small hornet
#

what host are you using?

remote zodiac
#

minehut

#

switching later

small hornet
#

damn

remote zodiac
#

friend just hasnt bought the external host

small hornet
#

use minekeep or local host

#

minehut has a limit

remote zodiac
#

ik

#

i usually

#

copy my skripts

#

make a new server

#

and continue coding

#

still 0 bucks

#

still no message

fresh fractal
#

are you using /sk reload <name of skript>.sk or /sk reload all

remote zodiac
#

name of sk

small hornet
remote zodiac
#

no

#

lemme do it

small hornet
#
  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."```
remote zodiac
#

nothing

#

oh

#

ill try that sk

#

nothing

#

no msg

#

no bands

small hornet
#

nothing at all?

remote zodiac
small hornet
#
  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."```
remote zodiac
#

nothing

#

at

#

all

#

btw

#

thank u guys for ur time

#

i really appreciate u trying to hyelp

small hornet
#

np, I've been on the train all day so it's a nice way to spend my time

fresh fractal
remote zodiac
#

ah lol

fresh fractal
#

btw I have strange problem with my skript too, and I'm waiting for reply

remote zodiac
#

no idea

#

im a beginerr

small hornet
#
  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."```
remote zodiac
#

idk what half of that skript u got means

small hornet
#

I'm clueless as to why nothing of all that broadcasts

remote zodiac
#

nothing at all

small hornet
#

could you try dzikljan?

#

not that I don't trust you, just wanna make sure

small hornet
fresh fractal
#

It's on #skript-help-3

#

one of newest

#

but I'll create post

fresh fractal
remote zodiac
#

one mor etime

#

also

#

im using

fresh fractal
#

everything

remote zodiac
#

skbee

#

sk-gui

#

as addons

#

sk-gui for sm else

small hornet
#

better not hear skquery or skrayfall

remote zodiac
#

no no no

#

not skquery

fresh fractal
#

delete this before mods gonna see

small hornet
#

funny that you know that as a beginner

runic carbon
#

same guy who uses spaces as indentation btw

small hornet
#

I use spaces

remote zodiac
#

forced to use spaces

small hornet
#

I prefer 2 spaces over tabs

remote zodiac
#

by sk

fresh fractal
#

@remote zodiac can you take screen shot of your scripts folder and your pasted text in file? I wanna see something

remote zodiac
#

gotcha

#

on sec

small hornet
fresh fractal
#

yea

small hornet
#

alr

remote zodiac
#

idk how to put ss's in a folder

#

sorry

#

nvm

#

here

#

sec

small hornet
#

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

remote zodiac
#

ik

#

im gonna put a cancel event after

#

to cancel the pickup

#

there

#

thats

#

the

#

txt

#

and uh

#

ss

small hornet
#

that will still give you infinite money

remote zodiac
#

uh how

#

wont it just

#

delete the copper

fresh fractal
#

Ok I think I know what is up

small hornet
#

no

#

you should also delete event-dropped item

remote zodiac
remote zodiac
small hornet
fresh fractal
remote zodiac
#

k

fresh fractal
#

wait wait wati

#

you don't have any line of our code in this file

remote zodiac
#

what

fresh fractal
#

that's all

remote zodiac
#

shit

#

wait

#

shit

#

wrong file

fresh fractal
#

lol

remote zodiac
#

thats my other one

#

no read

#

delete

fresh fractal
#

and delete this

remote zodiac
#

perferablky

fresh fractal
#

send me the right one please

remote zodiac
#

got u

small hornet
#

I don't think that's disallowed btw dzikljan

fresh fractal
#

idk

#

but just for sure

small hornet
#

as long as you're not harassing anyone or something similar

remote zodiac
#

delete this

#

please

fresh fractal
#

why does it have .md and not .sk?

#

and why no tabs?

remote zodiac
#

its a txt

#

made into a md

#

man idk

fresh fractal
#

change it to sk

remote zodiac
#

its an sk in the sk thing

#

it wont matter for when i send it to u

fresh fractal
#

so send me sk pls

#

because I need your raw file to help you

remote zodiac
fresh fractal
#

bro idk

small hornet
#

my advice, get a new server and only then continue testing

#

because the code clearly works so it is just a server issue

remote zodiac
#

alr

#

@fresh fractal

#

can u send me ur code

#

jsut so ik its updated

fresh fractal
#
  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."

remote zodiac
#

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

small hornet
#

I can help for about another hour, then I'm finally at my destination

remote zodiac
#

lol alright

#

i was hoping for @fresh fractal

#

to hop in a vc and let me ss

#

just incase yk

small hornet
#

if can hop in vc too if you'd like, I just can't ss back

remote zodiac
#

sure

#

gen 2

#

is it rlly friggin laggy

#

idk

#

is there anything u notice

#

?

small hornet
#

big red console errors

remote zodiac
#

yeah

#

lmao

#

alla

#

abt

#

skript

#

...

small hornet
#

I assume that's your issue, I can't read them due to quality tho

remote zodiac
#

i

#

think im outdated version

fresh fractal
#

can you copy this there?

remote zodiac
#

sure

#

copy what tho

fresh fractal
#

console error

small hornet
#

brb

remote zodiac
#

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

fresh fractal
#

Do you have skript from minehut library or plugin site?

remote zodiac
#

ps

fresh fractal
#

U sure your plugin is outdated?

small hornet
#

send /sk info

remote zodiac
#

it dont hurt

#

to see

fresh fractal
#

?

#

oh

#

ok

remote zodiac
fresh fractal
#

sry

remote zodiac
#

there

#

thats sk info

fresh fractal
#

It's the same as mine tho

#

try to reupload your plugin

#

reinstall i mean

remote zodiac
#

alr

#

wait

#

if i del it

#

will it remove my skripts

#

it will right?

small hornet
#

no

#

the folder will stay

#

just delete the .jar file

remote zodiac
#

ah ok

#

done

#

ill test now

#

yeah it doesnt work

small hornet
#

try getting a local host rq

remote zodiac
#

alr

#

is that just

#

by

#

downloading the file

#

and firing it up

#

?

fresh fractal
#

I haven't used local host for 4 years, but I think that you need to find console starting Command

remote zodiac
#

what are u using then

fresh fractal
#

Titanaxe

remote zodiac
#

free?

fresh fractal
#

Nah

#

But cheap

remote zodiac
#

hm ok

#

local host wont work

#

i cant change the version of the server

fresh fractal
#

But if you don't want to install local host, you can try completly deleting skript with files

#

Ohhh

fresh fractal
#

Then you need to Save your code

remote zodiac
#

yeah just downloaded them

fresh fractal
#

Damn this post is massive af

remote zodiac
#

2 min temu

#

is crazy

fresh fractal
#

Yoooooo

#

Lol

remote zodiac
#

why is that there

fresh fractal
#

2 min temu?

remote zodiac
#

yeah

fresh fractal
#

That means 2 minutes ago

remote zodiac
#

and temu

fresh fractal
#

But I'm from poland

#

And temu means ago

remote zodiac
#

ah

#

alr

#

its uh

#

restarting rn

fresh fractal
#

Ok ok

small hornet
#

lol I'm in Poland rn

remote zodiac
#

i now have

#

officialy

#

officially

#

<none> bucks

small hornet
#

did you load the correct code?

small hornet
#

try rejoining

remote zodiac
#

ah

#

0 bucks

#

and

#

thennnnn

#

i pick it up

#

and

#

guess what

#

0 bucks

small hornet
#

please just use a local host for testing

remote zodiac
#

i cant change the

#

friggin

#

version

small hornet
#

minehut obviously doesn't work and you won't be using it anyways

#

why not?

remote zodiac
#

on m.n

#

it says

#

1.21.7

#

not

small hornet
#

you just download a different paper.jar

remote zodiac
#

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

small hornet
#

download the 1.20.6 paper.jar from there

fresh fractal
#

But you are not from poland?

small hornet
#

nope

#

I'm from the Netherlands

fresh fractal
#

Oh insteresting

small hornet
#

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

small hornet
remote zodiac
#

alr

small hornet
#

yep

fresh fractal
#

Tatra Mountains?

small hornet
#

yep

#

2 or 3 day hike, not entirely sure which one yet

fresh fractal
#

I know some trails and spots here

#

If you want I can send you

small hornet
#

cool

remote zodiac
small hornet
#

k, I'll be gone in 20 tho

#

good luck with everything if I don't see you again today

fresh fractal
# small hornet cool

Are you going to conquer the highest peak? Sorry to ask, but I'm very curious.

fresh fractal
remote zodiac
#

k

small hornet
#

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

fresh fractal
#

Ohh... ok

#

Have fun ๐Ÿ‘

small hornet
#

thx

#

you guys too with this stupid problem ๐Ÿฅฒ

fresh fractal
#

@remote zodiac are you here?

remote zodiac
#

yeah

#

sorry

#

doin stuff rn

fresh fractal
#

I need to go

#

I will be back in 10 hours

remote zodiac
#

@fresh fractal

#

it works on the external host i bought

#

so dw

fresh fractal
#

Thank god

#

Ok