Solved Event-block's variables doesnt work

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

MeHow

Active Member
Feb 6, 2017
140
13
18
Lithuania
I tried to do one thing and i tried to use %event-block% to do that,but i doesnt work at all.
Code:
code_language.skript:
on place:
    set {%event-block%.placed} to true

****
                        if {%loop-block-2%.placed} is set:
                            delete {%loop-block-2%.placed}
                            stop
                        else:
                            cancel event

Thanks for reply
 
First of all, that's a horrible varible naming, you should use something like:
code_language.skript:
{blocks::placed::%event-location%}
Instead of that. Anyways, you problem is that it doesn't work in that way, putting an expression in a variable name will make it a string, so in that case if I place a stone, the variable will be {stone.placed}, and if I place another stone it'll be the same.

So, the solution here is use the location as index and value.
 
Status
Not open for further replies.