Jump to content
  • 0

How to make a less than statement in Skript?


JojoPLayz32983

Question

I've tried using the < symbol and also typing less than but I still get an error. Please help.

image.thumb.png.65612cd5b16d948287d2b67bc5494e22.png

Here is my script:

 

command /autocreateset <text> <text> <text> <text> <text> <text>:
    #                   item  input1 input2 input3 input4 input5:
    permission: op
    set {_loopidx} to 0
    while {_loopidx} < 26:
        set {_loopidx} to {_loopidx} + 1
        if {_loopidx} > 20:
            set {_itemtype} to "{%arg-6%}"
            set {_itemname} to "{%arg-6%} {%arg-1%}"
        else if {_loopidx} > 15:
            set {_itemtype} to "{%arg-5%}"
            set {_itemname} to "{%arg-5%} {%arg-1%}"
        else if {_loopidx} > 10:
            set {_itemtype} to "{%arg-4%}"
            set {_itemname} to "{%arg-4%} {%arg-1%}"
        else if {_loopidx} > 5:
            set {_itemtype} to "{%arg-3%}"
            set {_itemname} to "{%arg-3%} {%arg-1%}"
        else
            set {_itemtype} to "{%arg-2%}"
            set {_itemname} to "{%arg-2%} {%arg-1%}"
        give 1 itemtype {%arg-1%} named {_itemname} to player

 


Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
while {_loopidx} is smaller than 26:

Try writing it down in words as shown above.



Hope this helps!
If this solved the problem please select it as "Solution" to let people know it's been fixed

Have any questions? Feel free to ask!


Joined: 03/06/2018
VIP since: 13/03/2022


Contact:
Minecraft:  SWOEN [Click Here]
Discord:     SWOEN#8521 [Click Here]
Forums:     Forums Messages [Click Here]

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