asdasdasd12423465 Posted January 7, 2022 Share Posted January 7, 2022 my code is command /banknote [<number>] [<number>]: permission: op trigger: if arg-1 is set: if arg-2 is set: send "&aBanknote Created!" to player set {_reward} to arg-1 loop arg-2 times: give player 1 paper named "&l&fBanknote" with lore "&7Right Click To Recive Money!" if arg-2 is not set: send "&aBanknote Created!" to player set {_reward} to arg-1 give player 1 paper named "&l&fBanknote" with lore "&7Right Click To Recive Money!", and "&2Gives You &a$%{_reward}%" on right click: if player's held item is paper named "&l&fBanknote": if lore of player's held item contains "&7Right Click To Recive Money!": set player's held item to air set {_reward} to {_reward} * {_multi::%player's uuid%} add {_reward} to {cash::%player's uuid%} send "&aBalance: &c$%{cash::%player's uuid%}%" to player there are no errors. but when i use a banknote it says my money is still 0. i think the error is in this part set {_reward} to {_reward} * {_multi::%player's uuid%} add {_reward} to {cash::%player's uuid%} but i can't think of alternatives for this. so please help Link to comment Share on other sites More sharing options...
Pryzmm Posted January 8, 2022 Share Posted January 8, 2022 34 minutes ago, asdasdasd12423465 said: my code is command /banknote [<number>] [<number>]: permission: op trigger: if arg-1 is set: if arg-2 is set: send "&aBanknote Created!" to player set {_reward} to arg-1 loop arg-2 times: give player 1 paper named "&l&fBanknote" with lore "&7Right Click To Recive Money!" if arg-2 is not set: send "&aBanknote Created!" to player set {_reward} to arg-1 give player 1 paper named "&l&fBanknote" with lore "&7Right Click To Recive Money!", and "&2Gives You &a$%{_reward}%" on right click: if player's held item is paper named "&l&fBanknote": if lore of player's held item contains "&7Right Click To Recive Money!": set player's held item to air set {_reward} to {_reward} * {_multi::%player's uuid%} add {_reward} to {cash::%player's uuid%} send "&aBalance: &c$%{cash::%player's uuid%}%" to player there are no errors. but when i use a banknote it says my money is still 0. i think the error is in this part set {_reward} to {_reward} * {_multi::%player's uuid%} add {_reward} to {cash::%player's uuid%} but i can't think of alternatives for this. so please help youre setting {_reward} (a temp variable) to itself multipied by a multi that is also a temp variable and unset. The result will be <none> Owner of Lifestealed, Labs, Encore, UNOfficially and Observed OG [VIP] 12/26/20 - 10/27/2021 OG [PRO] 12/27/21 - 11/18/2022 OG [LEGEND] 11/18/2022 - 3/14/2023 [DEFAULT] 3/14/2023 - 5/8/2024 [MOD] 5/8/2024 - Present Link to comment Share on other sites More sharing options...
asdasdasd12423465 Posted January 8, 2022 Author Share Posted January 8, 2022 33 minutes ago, AgentGamerPro said: youre setting {_reward} (a temp variable) to itself multipied by a multi that is also a temp variable and unset. The result will be <none> i actually have multi set to 1 and its not a temp variable. its set to 1 on first join Link to comment Share on other sites More sharing options...
asdasdasd12423465 Posted January 8, 2022 Author Share Posted January 8, 2022 34 minutes ago, AgentGamerPro said: youre setting {_reward} (a temp variable) to itself multipied by a multi that is also a temp variable and unset. The result will be <none> and how do i fix this Link to comment Share on other sites More sharing options...
Pryzmm Posted January 8, 2022 Share Posted January 8, 2022 1 minute ago, asdasdasd12423465 said: i actually have multi set to 1 and its not a temp variable. its set to 1 on first join it is a temp variable. Since you have a "_" at the beginning of the variable Owner of Lifestealed, Labs, Encore, UNOfficially and Observed OG [VIP] 12/26/20 - 10/27/2021 OG [PRO] 12/27/21 - 11/18/2022 OG [LEGEND] 11/18/2022 - 3/14/2023 [DEFAULT] 3/14/2023 - 5/8/2024 [MOD] 5/8/2024 - Present Link to comment Share on other sites More sharing options...
TheDocs_ Posted January 8, 2022 Share Posted January 8, 2022 {_multi::%player's uuid%} You don't want to use a temp variable for the multi. And why are you adding a multiplier to the banknote? {multi::%player's uuid%} this is to use the current multi of that 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