Solved give loop-player

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

    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.
Here is the code I'm using http://pastebin.com/9Qcu0Wd6 but I'm getting this error: http://imgur.com/a/1sJci
All i want is to give multiple items to the players not only 1 or 2 or what is in the skript.

try this.


code_language.skript:
if arg 1 is "giveall":
    if arg 2 is set:
        player has permission "lottery.admin.giveall":
            give %arg 2% magma cream with name "&2&lL&a&lottery &6&lC&e&loin" with lore "&e&lType &a&l/lottery play&e&l!" to all player
            broadcast "{@prefix} &a&l%player% &e&lgave all players %arg 2% &2&lL&a&lottery &6&lC&e&loins&e&l!"
        else:
            send "&4&lYou don't have permission to do that"
            stop
    else:
        send "{@prefix} &e&l/lottery giveall <amount>"
        stop
 
This will not help me because I want to loop all players and to give them all this item and argument 2 is for how many items I gave to them.
 
Please read the basics of Skript, the percent signs aren't used unless it's on a "quoted text" or into a variable, and you missed an "of" there, it should be:
code_language.skript:
give arg-2 of your item...
also, the give effect supports multiple objects, you don't have to loop all the players, just doing the following will work:
code_language.skript:
give arg-2 of your item to all players

Another thing, you don't have to put a "stop" at the end of the trigger because it'll stop there such as there is no code to execute.
 
Status
Not open for further replies.