Solved will this skript work? if not please fix it

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

Loaded with every command that could be used before, gj, tell me what exactly doesnt work in my code? If you mean this line
Code:
execute console command "execute as %player% run {_selectedCommand}"
Then idk if i want to cry or laugh XD
also idk if you know what loop is, but okay :emoji_slight_smile:
nah thats ok, it just had a little syntax error.
Your code does not have any "Used code detection" and it can execute the same command again and again and it doesnt stop doing it.
 
okay, You think your way, I think my way, it doesn't matter, the dude here has code of all kinds, so he can choose what he wants
 
Loaded with every command that could be used before, gj, tell me what exactly doesnt work in my code? If you mean this line
Code:
execute console command "execute as %player% run {_selectedCommand}"
Then idk if i want to cry or laugh XD
also idk if you know what loop is, but okay :emoji_slight_smile:
Your code let's me use more than 14 commands by repeating the commands inside if the variable, which shouldn't happen. It should stop after all 14 commands are used. And yours doesn't do that, mine does.
And that line just had small syntax error which I myself fixed.
 
okay thats possible i didnt test it, you did, i dont have time to that rn, anyways the syntax error is where? xd Also you should add the loop on load to your skript, atleast i would do that. But like i said i did it from what i understand. :/
 
Last edited:
okay thats possible i didnt test it, you did, i dont have time to that rn, anyways the syntax error is where? xd Also you should add the loop on load to your skript, atleast i would do that. But like i said i did it from what i understand. :/
There is ur syntax errors

on load:
add "say 1", "say 2", "say 3", "say 4", "say 5", "say 6", "say 7", "say 8", "say 9", "say 10", "say 11", "say 12", "say 13" and "say 14" to {commands::*}
loop {usedcommands::*}:
remove loop-value from {commands::*}

command /randomgem:
permission: gem.random
permission message: You cannot execute that command!
trigger:
set {_selectedcommand} to random element out of {commands::*}
execute console command "execute as %player% run {_selectedCommand}"
remove {_selectedcommand} from {commands::*}
add {_selectedcommand} to {usedcommands::*}
 
Unfortunately for you there is no syntax error
for the random element, there is your LOVELY syntax you are still yapping about [a] random element [out] of %objects%
For the second "syntax" i just coppied the code that the guy had there, because why would i change his console command? That doesn't make any sense.
 
what are u trying to make this would be simpler if I knew

I made this so far and it works, have a great time and mark this thread as "Solved".

Code:
on load:
    set {commands::*} to "say 1", "say 2", "say 3", "say 4", "say 5", "say 6", "say 7", "say 8", "say 9", "say 10", "say 11", "say 12", "say 13" and "say 14"

command /randomcommand:
    trigger:
        if {commands::*} is not set:
            send "&cThere aren't any commands to use!"
        else:
            set {_f} to random element of {commands::*}
            remove {_f} from {commands::*}
            execute console command "sudo %player% %{_f}%"
thx :emoji_grinning:
 
  • Like
Reactions: HeliumBoi
Unfortunately for you there is no syntax error
for the random element, there is your LOVELY syntax you are still yapping about [a] random element [out] of %objects%
For the second "syntax" i just coppied the code that the guy had there, because why would i change his console command? That doesn't make any sense.
Idk about that one but it's giving errors on my server, it could be because of Addons too idk.
 
Idk about that one but it's giving errors on my server, it could be because of Addons too idk.
Hm, thats interesting, i looked in the docs again and elements are only from skript (not any special addons) so its strange that its throwing error on your server. On my server its running completely fine.