Solved Prestige fix

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Feb 26, 2019
29
0
1
23
This is my skript:
command /prestige:
trigger:
{gold::%player%} >= 100
broadcast "%player% has prestiged!"
set {gold::%player%} to 0
add 1 to {prestige::%player%}
{gold::%player%} <= 100
message "&7You need 100 gold to prestige!" to player
Can anyone fix this for me please? When i prestige it says You need 100 gold to prestige! But i want it so it messages to you when you have under 100 gold.
 
This is my skript:
command /prestige:
trigger:
{gold::%player%} >= 100
broadcast "%player% has prestiged!"
set {gold::%player%} to 0
add 1 to {prestige::%player%}
{gold::%player%} <= 100
message "&7You need 100 gold to prestige!" to player
Can anyone fix this for me please? When i prestige it says You need 100 gold to prestige! But i want it so it messages to you when you have under 100 gold.
From what I understand, I think it would be something like this:

Code:
command /prestige:
   trigger:
      {gold::%player%} >= 100:
          broadcast "%player% has prestiged!"
          set {gold::%player%} to 0
          add 1 to {prestige::%player%}
          stop
      {gold::%player%} < 100:
          message "&7You need 100 gold to prestige!" to player
[doublepost=1551463130,1551462988][/doublepost]In your code, you had placed "if it was equal to or greater than 100 prestige", but also put "if it was equal to or less than 100 send a message that could not make prestige" and that causes the "error"
 
  • Like
Reactions: thomas_nietoke
From what I understand, I think it would be something like this:

Code:
command /prestige:
   trigger:
      {gold::%player%} >= 100:
          broadcast "%player% has prestiged!"
          set {gold::%player%} to 0
          add 1 to {prestige::%player%}
          stop
      {gold::%player%} < 100:
          message "&7You need 100 gold to prestige!" to player
[doublepost=1551463130,1551462988][/doublepost]In your code, you had placed "if it was equal to or greater than 100 prestige", but also put "if it was equal to or less than 100 send a message that could not make prestige" and that causes the "error"
Thanks
 
Status
Not open for further replies.