Skripter01 Posted September 14, 2020 Share Posted September 14, 2020 (edited) Skript: Money Generator on join: wait 1 tick while player is alive: if blocks in radius 10 of player contains emerald block: add 4 to player's balance send "&a&l+ $4" to player wait 1 second Ingame it says: Encountered 1 Error, (In line 5) Edited September 14, 2020 by Skripter01 Forgot a few details. Link to comment Share on other sites More sharing options...
UntitledGoose Posted September 14, 2020 Share Posted September 14, 2020 (edited) do you have Vault and an economy plugin (like EssentialsX) Edited September 14, 2020 by TheGoose grammar VIP since January 7th, 2020 Support since September 19th, 2020 Helper since November 3rd, 2020 Moderator since March 8th, 2021 Link to comment Share on other sites More sharing options...
Uravunos Posted September 15, 2020 Share Posted September 15, 2020 On 9/14/2020 at 10:14 AM, Skripter01 said: Skript: Money Generator on join: wait 1 tick while player is alive: if blocks in radius 10 of player contains emerald block: add 4 to player's balance send "&a&l+ $4" to player wait 1 second Ingame it says: Encountered 1 Error, (In line 5) Yes, TheGoose is right, you should install the SkVault or Vault plugin if you want it to work, otherwise it will result in an error. Hope that helps! Link to comment Share on other sites More sharing options...
ignOverbidding Posted September 15, 2020 Share Posted September 15, 2020 on join: wait 1 tick while player is alive: if blocks in radius 10 of player contains emerald block: add 4 to player's balance send "&a&l+ $4" to player wait 1 second even if line 5 was correct, the skript alone wouldn't work. you have to use variables join: wait 1 tick while player is alive: if blocks in radius 10 of player contains emerald block: add 4 to {balance} send "&a&l+ $4" to player wait 1 second command balance: send "&aBalance: &e{balance}" to player # if you want to make it so you can purchase things tell me and ill add that Link to comment Share on other sites More sharing options...
_Tarna_ Posted September 15, 2020 Share Posted September 15, 2020 24 minutes ago, Tmoa said: on join: wait 1 tick while player is alive: if blocks in radius 10 of player contains emerald block: add 4 to player's balance send "&a&l+ $4" to player wait 1 second even if line 5 was correct, the skript alone wouldn't work. you have to use variables join: wait 1 tick while player is alive: if blocks in radius 10 of player contains emerald block: add 4 to {balance} send "&a&l+ $4" to player wait 1 second command balance: send "&aBalance: &e{balance}" to player # if you want to make it so you can purchase things tell me and ill add that Yours won't work. They are probably using vault and Essentials eco so they are using add 4 to player's balance so it will add to that balance. Adding to the variable {balance} does not add to the essentials eco and is also a global variable. So everyone will have the same amount of money. And your indents were wrong too. Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
HunterLux Posted September 17, 2020 Share Posted September 17, 2020 on join: wait 1 tick while player is alive: if blocks in radius 10 of player contains emerald block: add 4 to player's balance send "&a&l+ $4" to player wait 1 second See, Skript treats "balance" as in the balance you have in Vault/SkVault. If you do not have them installed, I suggest making your own economy with variables. Here's a balance script I just made: command /balance [<text>] [<number>] [<offlineplayer>]: aliases: bal trigger: if {bal::%player's uuid%} is not set: set {bal::%player's uuid%} to 0 if arg-1 is not set: send "&aBalance: &a{bal::%player's uuid%}" to player else if arg-1 is "add": if player has permission "bal.add": if arg-2 is not set: send "&cYou must set the number of coins to add" to player if arg-3 is not set: add arg-2 to {bal::%player's uuid%} send "&bAdded &c$%arg-2%&b to your balance" to player else if arg-1 is remove: if player has permission "bal.remove": if arg-2 is not set: send "&cYou must set the number of coins to remove" to player if arg-3 is not set: remove arg-2 from {bal::%player's uuid%} send "&bRemoved &c$%arg-2%&b from your balance" to player Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now