#Need help with vault-based shop skript

1 messages · Page 1 of 1 (latest)

dawn marsh
#

this is the shop skript:

wheat glacier
#

Without reading the entirity of that, i'm gonna ask if you have added Vault to you server?
Because that is the only requirement to make Vault syntax work

dawn marsh
#

yes i have vault

#

what is vault syntax?

wheat glacier
#

Where does your skript appear to fail?

dawn marsh
#

it doesnt fail

wheat glacier
#

vault syntax would be like "remove x from y's balance"

dawn marsh
#

so for example it sais: "&fBalance: %{balance::%uuid of player%}%"

#

this isnt the vault balance display

fleet thorn
#

hey blok can you send /vault-info

dawn marsh
#

/vault-info

#

bruv

#

in game?

#

or where

wheat glacier
#

probs

fleet thorn
#

if you have vault it'll show up in game
that'll give us the needed information to see if you're missing anything

wheat glacier
#

because vault knows for itself

#

so u can just do "player's balance" every time

dawn marsh
#

ah ok

fleet thorn
#

example of a invalid vault currency

wheat glacier
dawn marsh
#

so if i do players balance will that show the vault balance?

dawn marsh
wheat glacier
#

it will also use whatever format vault is setup to use

dawn marsh
#

that good?

fleet thorn
#

yeah so you can freely use

%offlineplayers%'[s] balance
balance of %offlineplayers%
wheat glacier
#

Essentials also hooks into vault, so any of their commands will act on the same balances

dawn marsh
#

ohhhhhhhhhhh

wheat glacier
#

true

dawn marsh
#

so if i just replace balance::uuid of player with offlineplayer balance in the entire skript it will showcase the essetials economy ?

fleet thorn
#

%offlineplayer% refers to the player var but yes

dawn marsh
#

with the %right ?

fleet thorn
#

without

wheat glacier
#

yeye

#

if u use it in a string u will need the %'s as usual

fleet thorn
#

% is used as a type definition in syntax so player's balance is correct but %player%'s balance is incorrect
as for strings it's "%player's balance%"

dawn marsh
#

yea

#

What is wrong here?

#

nvm got it alreaddy

#

@wheat glacier now i got the problem that the shop and the economy isn't connected, if i try to buy something it sais "you don't have enought money to buy this" while i have 100million

#

do you know what causes this?

wheat glacier
dawn marsh
#

oh i might just forgot to chance somme player uuids to players balance

#

ye i forgot to replace them from every item too

wheat glacier
#

u'll usually never need offlineplayer for a command used by an online player

dawn marsh
#

ah ok makes sence 🤣🤣

#

This is the last error i get its prob another dumb fault but i dont see it, u got an idea?

dawn marsh
#

Without the %?

fleet thorn
#

indeed

dawn marsh
#

Oh ofc

#

Ty guys so much 🙂

wheat glacier
#

because it is mostly used to parse a variable to a string in one way or another