1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Greather than %arg-2% balance

Discussion in 'Skript' started by Kondii, Dec 29, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. Kondii

    Kondii Member

    Joined:
    Jun 29, 2017
    Messages:
    17
    Likes Received:
    1
    Skript Version: Skript 2.1.2
    Skript Author: Njol
    Minecraft Version: 1.8

    Code:
    Code (Skript):
    1. Command /pay [<offline player>] [<number]:
    2.     trigger:
    3.         if arg-1 is set:
    4.             if arg-2 is set:
    5.                 if arg-2 is between 1 and 9999999999:
    6.                     if player's balance is greather than %arg-2%:
    7.                         send "&8&l:: &a&lSkolepay &8&l:: &7Du overførte &a&l%arg-2% &7til &e%arg-1%" to player
    8.                         send "&8&l:: &a&lSkolepay &8&l:: &7Du fik &a&l%arg-2% &7fra %arg-1%" to arg-1
    9.                         add %arg-2% to %arg-1% balance
    10.                         remove %arg-2% from %player% balance
    11.  
    Problem:
    It says that
    Code (Skript):
    1. if player's balance is greather than %arg-2%:
    is not an entity
    Don't what i did wrong. It have to check if player's balance is bigger than %arg-2% so you can't overwrite your balance.
     
  2. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    Remove the % %. Those are only used inside of variables and strings.
     
  3. Kondii

    Kondii Member

    Joined:
    Jun 29, 2017
    Messages:
    17
    Likes Received:
    1
    Now it says "greather than is not a type"
     
  4. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    greater not greather
     
  5. Kondii

    Kondii Member

    Joined:
    Jun 29, 2017
    Messages:
    17
    Likes Received:
    1
  6. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    9
  7. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    Code (Skript):
    1. add arg-2 to arg-1's balance
    2. remove arg-2 from player's balance
    Literally told you this earlier. % % are only used in variables and strings. Also, you forgot to add 's to arg-1 and player.
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...