AgentGamerPro Posted May 2, 2021 Share Posted May 2, 2021 me again i need help again. Im using vault to try and make a shop but it keeps saying i have insufficent funds loop {Gens::*}: set {_GenID} to loop-index set {_GenType} to loop-value clear {Shop::*} add {Gens::*} to {Shop::*} set {_DropID} to {GenDrops::%{_GenID}%} set {_SellValue} to {GenSell::%{_GenID}%} set {_BuyValue} to {GenBuy::%{_GenID}%} set {_Slot} to {_GenID} - 1 format gui slot {_Slot} of player with {_GenType} named "" with lore "&6Buy Gen: &e%{_BuyValue}%&e$" and "&6Sell Per Drop: &e%{_SellValue}%&e$" to run: if player's balance >= {_BuyValue}: remove {_BuyValue} from player's balance give player loop-value send "{@Prefix} &aPurchase Successful!" to player else: send "{@Prefix} &cNot enough funds!" to player if {_Slot} = 44: stop loop format gui slot 49 of player with barrier named "&cClose" to close Lifestealed | Minecraft Servers [VIP] 12/26/20 - 10/27/2021[PRO] 12/27/21 - Present Link to comment Share on other sites More sharing options...
_Tarna_ Posted May 2, 2021 Share Posted May 2, 2021 debug it. Check what {_BuyValue} set to by sending the value to yourself Discord - Tarna256#8675 In-game name - _Tarna_ Follow @Tarna_256 on Twitter --------------------------------------------------------- [VIP] - 7/27/2020 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...
AgentGamerPro Posted May 2, 2021 Author Share Posted May 2, 2021 55 minutes ago, Tarnerd said: debug it. Check what {_BuyValue} set to by sending the value to yourself I already tried this, its an integer Lifestealed | Minecraft Servers [VIP] 12/26/20 - 10/27/2021[PRO] 12/27/21 - Present Link to comment Share on other sites More sharing options...
_Tarna_ Posted May 2, 2021 Share Posted May 2, 2021 12 minutes ago, AgentGamerPro said: I already tried this, its an integer What was it sent to when you sent it to yourself? And also make sure you actually have money too. Discord - Tarna256#8675 In-game name - _Tarna_ Follow @Tarna_256 on Twitter --------------------------------------------------------- [VIP] - 7/27/2020 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...
AgentGamerPro Posted May 2, 2021 Author Share Posted May 2, 2021 3 minutes ago, Tarnerd said: What was it sent to when you sent it to yourself? And also make sure you actually have money too. 1. yes i have money 2. it was supposed to be removed from my inventory Lifestealed | Minecraft Servers [VIP] 12/26/20 - 10/27/2021[PRO] 12/27/21 - Present Link to comment Share on other sites More sharing options...
_Tarna_ Posted May 2, 2021 Share Posted May 2, 2021 2 minutes ago, AgentGamerPro said: 1. yes i have money 2. it was supposed to be removed from my inventory But what was {_BuyValue} set to when you sent it to yourself? Cause currently the only reason it may be saying not enough funds is if that variable isn't set or you don't actually have more money than that variable. Discord - Tarna256#8675 In-game name - _Tarna_ Follow @Tarna_256 on Twitter --------------------------------------------------------- [VIP] - 7/27/2020 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...
AgentGamerPro Posted May 2, 2021 Author Share Posted May 2, 2021 (edited) 6 minutes ago, Tarnerd said: But what was {_BuyValue} set to when you sent it to yourself? Cause currently the only reason it may be saying not enough funds is if that variable isn't set or you don't actually have more money than that variable. its set from an argument from a command. eg. /gen creategen 100 200 with 100 being sell value and 200 being BUY VALUE Edited May 2, 2021 by AgentGamerPro Lifestealed | Minecraft Servers [VIP] 12/26/20 - 10/27/2021[PRO] 12/27/21 - Present Link to comment Share on other sites More sharing options...
_Tarna_ Posted May 2, 2021 Share Posted May 2, 2021 12 minutes ago, AgentGamerPro said: its set from an argument from a command. eg. /gen creategen 100 200 with 100 being sell value and 200 being BUY VALUE ok but did you actually send the variable to yourself in that command or wherever it is in like I've been saying to actually see what it is set to and make sure no errors happened. Just saying you set it in a different command doesn't mean it should work. Like you loop that variable and get an id from it and it may be getting a wrong value so to make sure everything is going right, send that variable to yourself in that code. Like I said earlier, the only reason it would be saying not enough funds is if that variable isnt set or you don't have more money than hat variable. Discord - Tarna256#8675 In-game name - _Tarna_ Follow @Tarna_256 on Twitter --------------------------------------------------------- [VIP] - 7/27/2020 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...
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