Jump to content

This makes no sence


asdasdasd12423465

Recommended Posts

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

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>

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

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

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

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...