/spawnmob -ish type of command help

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

Deleted member 6377

Skript Version: Skript 2.2 (dev20c)
Skript Author: Bensku
Minecraft Version: 1.8.9
---
Full Code:

code_language.skript:
command /creeper [<text>]:
    permission: creeper.use
    permission message: &cNo permission!
    Usage: &c/creeper
    executable by: players
    trigger:
        if arg-1 is not set:
            spawn 1 creeper
            send "&d1 &bCreeper spawned."
        else:
            spawn %arg-1% creeper
            send "&d%arg-1% &bCreepers spawned."

Basically if you don't understand this I'm trying ot make a command where if you type /creeper it will spawn a creeper at your location and if you put a number after /creeper (/creeper 10) it will spawn that number (10) of creepers.

Errors on Reload:

code_language.skript:
[00:58:49 ERROR]: '%arg-1% creeper' is not an entity type (creeper.sk, line 12: spawn %arg-1% creeper')

Other Useful Info:

Addons using (including versions):
SkRayFall 1.9.3
sKQuery 3
Troubleshooting:

Have you tried searching the docs? Yeah
Have you tried searching the forums? Well, Google
What other methods have you tried to fix it? Trying %arg 1%, arg 1, argument, <player>, <amount>, <number>

I also tried doing the Loop thingy but I'm still a Skript noob so I'm not good at it. I tried to make it so the server loops the 'spawn 1 creeper' %arg-1% amount of times but that didn't work ;P
 
1. You only use percent signs within texts ("this is a text") to parse expressions.
2. The argument type has to be "number" or "integer" for it to work.
2. You just have to put an "of" between the amount and the entity type (creeper in this case). Of course, this won't work either way if you didn't do what #2 says.
 
1. You only use percent signs within texts ("this is a text") to parse expressions.
2. The argument type has to be "number" or "integer" for it to work.
2. You just have to put an "of" between the amount and the entity type (creeper in this case). Of course, this won't work either way if you didn't do what #2 says.
Uhhhhh

code_language.skript:
command /ecreeper <number>:
    permission: creeper.ecreeper
    permission message: &cNo permission!
    Usage: &c/creeper
    executable by: players
    trigger:
        if arg-1 is not set:
            spawn 1 creeper
            send "&d1 &bCreeper spawned."
        else:
            spawn %arg-1% of creeper
            send "&d%arg-1% &bCreepers spawned."
??

Idk how to use these <number> and other stuff cause it doesn't say anywhere
 
like Snow said, " You only use percent signs within texts ("this is a text") to parse expressions."
So change your
"spawn %arg-1% of creeper" to "spawn arg-1 of creeper"

For info on numbers check HERE
For info on arguments in commands, check HERE
 
like Snow said, " You only use percent signs within texts ("this is a text") to parse expressions."
So change your
"spawn %arg-1% of creeper" to "spawn arg-1 of creeper"

For info on numbers check HERE
For info on arguments in commands, check HERE
I did that. Thanks, there are no more errors in the Skript. But If I type /creeper, it spawns one creeper. When I type a number after it, all it does is say in chat "4 Creepers spawned." etc.
 
I did that. Thanks, there are no more errors in the Skript. But If I type /creeper, it spawns one creeper. When I type a number after it, all it does is say in chat "4 Creepers spawned." etc.
Can you send the whole updated code so I can see exactly what you got. Thanks
 
Can you send the whole updated code so I can see exactly what you got. Thanks
code_language.skript:
command /creeper [<number>]:
    permission: creeper.use
    permission message: &cNo permission!
    Usage: &c/creeper
    executable by: players
    trigger:
        if arg-1 is not set:
            spawn 1 creeper
            send "&d1 &bCreeper spawned."
        else:
            spawn arg-1 of creeper
            send "&d%arg-1% &bCreepers spawned."
 
Skript Version: Skript 2.2 (dev20c)
Skript Author: Bensku
Minecraft Version: 1.8.9
---
Full Code:

code_language.skript:
command /creeper [<text>]:
    permission: creeper.use
    permission message: &cNo permission!
    Usage: &c/creeper
    executable by: players
    trigger:
        if arg-1 is not set:
            spawn 1 creeper
            send "&d1 &bCreeper spawned."
        else:
            spawn %arg-1% creeper
            send "&d%arg-1% &bCreepers spawned."

Basically if you don't understand this I'm trying ot make a command where if you type /creeper it will spawn a creeper at your location and if you put a number after /creeper (/creeper 10) it will spawn that number (10) of creepers.

Errors on Reload:

code_language.skript:
[00:58:49 ERROR]: '%arg-1% creeper' is not an entity type (creeper.sk, line 12: spawn %arg-1% creeper')

Other Useful Info:

Addons using (including versions):
SkRayFall 1.9.3
sKQuery 3
Troubleshooting:

Have you tried searching the docs? Yeah
Have you tried searching the forums? Well, Google
What other methods have you tried to fix it? Trying %arg 1%, arg 1, argument, <player>, <amount>, <number>

I also tried doing the Loop thingy but I'm still a Skript noob so I'm not good at it. I tried to make it so the server loops the 'spawn 1 creeper' %arg-1% amount of times but that didn't work ;P

Here is the "Loop Thingy" you were trying to do:

code_language.skript:
command /creeper [<number>]:
    permission: creeper.use
    permission message: &cNo permission!
    Usage: &c/creeper
    executable by: players
    trigger:
        if arg-1 is not set:
            spawn 1 creeper
            send "&d1 &bCreeper spawned."
        else:
            loop arg-1 times:
                spawn a creeper
            send "&d%arg-1% &bCreepers spawned."

Well anyway your code does work for me. [Not the "Loop Thingy" one
 
code_language.skript:
command /creeper [<number>]:
    permission: creeper.use
    permission message: &cNo permission!
    Usage: &c/creeper
    executable by: players
    trigger:
        if arg-1 is not set:
            spawn 1 creeper
            send "&d1 &bCreeper spawned."
        else:
            spawn arg-1 of creeper
            send "&d%arg-1% &bCreepers spawned."

I just tested it, and I have no issues.
I did /creeper and 1 creeper spawned,
I did /creeper 10 and 10 creepers spawned

Then again I am not testing on 1.8.9.... But I don't see how it should be much different
[doublepost=1525549641,1525549364][/doublepost]UPDATE:
I tested on 1.8.8 (not 1.8.9 because i didn't have one already set up)
Also tested on Skript bensku 2.2 dev 20b because i couldn't find a dev20c anywhere

Still works, same thing, /creeper got me 1 creeper and /creeper 10 spawned 10, no issues
 
I just tested it, and I have no issues.
I did /creeper and 1 creeper spawned,
I did /creeper 10 and 10 creepers spawned

Then again I am not testing on 1.8.9.... But I don't see how it should be much different
[doublepost=1525549641,1525549364][/doublepost]UPDATE:
I tested on 1.8.8 (not 1.8.9 because i didn't have one already set up)
Also tested on Skript bensku 2.2 dev 20b because i couldn't find a dev20c anywhere

Still works, same thing, /creeper got me 1 creeper and /creeper 10 spawned 10, no issues
Hmm, maybe my Skript version is outdated. Anyway, thanks for your help!
Well anyway your code does work for me. [Not the "Loop Thingy" one
Ty !
 
Last edited by a moderator:
Hmm, maybe my Skript version is outdated. Anyway, thanks for your help!

Ty !
Im not really sure how yours could be outdated, as I used versions older than yours.
Try removing some of your addons, I know certain old/outdated addons can cause issues
 
Status
Not open for further replies.