Solved Custom Command has no output

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

DaPumpkinGR

Member
Mar 7, 2017
3
0
0
26
My problem is that when i use /number with the create arguement, the command returns nothing and it doesn't set a number for me.

Skript Version: 2.2-dev34
Skript Author:Bensku
Minecraft Version:1.12.2

---
Full Code:


i removed the skript because someone already stole it in 1 day.

Errors on Reload:

code_language.skript:
[09:23:47 WARN]: [Skript] Possible name conflict of variables {number::%arg 2%} and {number::*} (there might be more conflicts). (phones.sk, line 21: clear {number::%arg 2%}')
[09:23:47 WARN]: [Skript] Possible name conflict of variables {number::%arg 1%} and {number::*} (there might be more conflicts). (phones.sk, line 57: clear {number::%arg 1%}')
[09:23:47 INFO]: [Skript] All scripts loaded without errors.
[09:23:47 INFO]: [Skript] Loaded 1 script with a total of 0 triggers and 5 commands in 0.15 seconds
[09:23:47 INFO]: [Skript] Finished loading.
[09:23:48 INFO]: [Skript] You're currently running the latest stable version of Skript.

Other Useful Info:

Addons using (including versions):
SkRayFall 1.9.12

Troubleshooting:

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it?Renamed local variables.
 
Last edited:
Okay, I figured it out.

Because this --> loop {number::*}
Its empty, there is nothing to loop.
For fun, i added this to the bottom of your skript

code_language.skript:
command /testnum <offline player>:
    trigger:
        set {number::%arg-1%} to a random integer from 6900000000 to 6999999999
        send "%arg-1%'s new number is %{number::%arg-1%}%" to player

This allow me to set a number for another player, once I did that, your code works perfectly fine.

A quick simple fix I found for this, would be to add to the top
code_language.skript:
on load:
    set {number::server} to 1

Restart your server, and you should be good to go :emoji_slight_smile:
 
Last edited:
Okay, I figured it out.

Because this --> loop {number::*}
Its empty, there is nothing to loop.
For fun, i added this to the bottom of your skript

code_language.skript:
command /testnum <offline player>:
    trigger:
        set {number::%arg-1%} to a random integer from 6900000000 to 6999999999
        send "%arg-1%'s new number is %{number::%arg-1%}%" to player

This allow me to set a number for another player, once I did that, your code works perfectly fine.

A quick simple fix I found for this, would be to add to the top
code_language.skript:
on load:
    set {number::server} to 1

Restart your server, and you should be good to go :emoji_slight_smile:

Works like a charm, thank you!
 
Status
Not open for further replies.