item name not working

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

loadka95

Active Member
Feb 24, 2017
78
6
8
26
I dont know if its a bug or im just doing it wrong, but when i use the command its says "<none>" but i dont know why..
code_language.skript:
command /dut:
    trigger:
        loop items in player's inventory:
            message "%name of loop-item%" to player  # <-- it's always says <none> even if the item is named
            if name of loop-item is "hi":
                remove loop-item from player's inventory
                stop
 
Solved :emoji_grinning:
code_language.skript:
command /dut:
    trigger:
        loop items in player's inventory:
            wait 1 second
            message "%name of loop-item%" to player
            if name of loop-item is "hi":
                remove loop-item from player's inventory
                stop
command /test:
    trigger:
        give a emerald named "hi" to the player
[doublepost=1494946952,1494946618][/doublepost]Hey I am trying to do this but the block stay red wool
code_language.skript:
loop all blocks in radius 5 of attacker:
    set loop-block to red wool
    wait 2 second
    set loop-block to loop-block
 
Hey I am trying to do this but the block stay red wool
code_language.skript:
loop all blocks in radius 5 of attacker:
    set loop-block to red wool
    wait 2 second
    set loop-block to loop-block
You're doing this:
code_language.skript:
set looped block to red wool #now the block is a red wool block
wait 2 seconds
set red wool block to red wool block
 
[doublepost=1494946952,1494946618][/doublepost]Hey I am trying to do this but the block stay red wool
code_language.skript:
loop all blocks in radius 5 of attacker:
    set loop-block to red wool
    wait 2 second
    set loop-block to loop-block
What do you want to do in this code? I don't get it.
You set the blocks in the radius 5 to red wool in the line 2, in the 4th line you set the red wool to red wool again.
 
What do you want to do in this code? I don't get it.
You set the blocks in the radius 5 to red wool in the line 2, in the 4th line you set the red wool to red wool again.
example if the blocks are cobblestone I whant to set that to red wool them set the red wool back to cobblestone
[doublepost=1494985867,1494985756][/doublepost]
You're doing this:
code_language.skript:
set looped block to red wool #now the block is a red wool block
wait 2 seconds
set red wool block to red wool block
ok thanks I whant to set loop block to red wool them set it back to that first loop block again
 
example if the blocks are cobblestone I whant to set that to red wool them set the red wool back to cobblestone
code_language.skript:
loop all blocks in radius 5 of attacker:
    set {_blockreplaced} to loop-block
    set loop-block to red wool
    wait 2 second
    set loop-block to {_blockreplaced}
    delete {_blockreplaced}

I think this will work.
 
Status
Not open for further replies.