Jump to content

Arg-2 not registering


AgentGamerPro

Recommended Posts

i made this skript (plain skript) for summoning a specific amount of mobs with one command, and i'm getting an error saying it can't understand the condition or effect in line 14.

command /create <text> [<number>]:
    permission: skript.create
    permission message: "&c&lHey! &r&4Sorry, but you can't use this command."
    trigger:
        if arg-1 is not set:
            send "&c&l[&4&lError&c&l] &r&4Mob is not set."
        if arg-1 is "Mobs":
            send "&cMobs: Cow, Pig"
        if arg-1 is "Cow":
            if arg-2 is not set:
                send "&c&l[&4&lError&c&l] &r&4Set the amount of mobs you wish to summon"
            else:
                set {number} to arg-2
                summon %{number}% cows at location 122, 65, -282 in world "world"

can anyone help?

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

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

 

Link to comment
Share on other sites

summon {number} of cows at location(122, 65, -282, world "world")

Percent Signs are only used to display variables inside of a string. If you are not doing that, the % are not needed. 

  • Confused 1

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

9 hours ago, _Tarna_ said:

summon {number} of cows at location(122, 65, -282, world "world")

Percent Signs are only used to display variables inside of a string. If you are not doing that, the % are not needed. 

Im not getting the same error, but it's still an error. "numeric ids are not supported anymore"

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

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

 

Link to comment
Share on other sites

9 hours ago, Agentgamer100YT said:

Im not getting the same error, but it's still an error. "numeric ids are not supported anymore"

Hmm the syntax on the docs say

(spawn|summon) %number% of %entitytypes% [%directions% %locations%]

Not sure why that isn't working. Maybe instead of {number}, just use arg-2 or maybe even remove of cause the docs don't use of when spawning multiple entities. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

actually, try this:

 

command /create [<text>] [<integer>]:
    permission: skript.create
    permission message: "&c&lHey! &r&4Sorry, but you can't use this command."
    trigger:
        if arg-1 is not set:
            send "&c&l[&4&lError&c&l] &r&4Mob is not set."
        else if arg-1 is "Mobs":
            send "&cMobs: Cow, Pig"
        else if arg-1 is "Cow":
            if arg-2 is not set:
                send "&c&l[&4&lError&c&l] &r&4Set the amount of mobs you wish to summon"
            else:
                summon arg 2 cows at location at player's targeted block

 

 

image.png

image.png

 

 

Link to comment
Share on other sites

first off, don't send like 3 seperate messages at once. use the edit feature

second, i need it to spawn in a specific area, and your skript is giving me the error from the beginning

 

@ztimhirsch1here is the current code
 

command /create [<text>] [<number>]:
    permission: skript.create
    permission message: "&c&lHey! &r&4Sorry, but you can't use this command."
    trigger:
        if arg-1 is not set:
            send "&c&l[&4&lError&c&l] &r&4Mob is not set."
        if arg-1 is "Mobs":
            send "&c&l[&4&lMobs&c&l] &4Cow, Pig"
        if arg-1 is "Cow":
            if arg-2 is not set:
                send "&c&l[&4&lError&c&l] &r&4Set the amount of mobs you wish to summon"
            else:
                set {number} to arg-2
                summon {number} cows at location(122, 65, -282 in world "world")

 

Edited by Agentgamer100YT

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

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

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...