Basic code, strange errors

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

computermouse

Member
Feb 16, 2024
2
0
1
16
I wanted to creat a script that would forbid people from placing a block, messaging 'It's not allowed to place a block.' This is what I wrote.

My codes:
Code:
on place:
        message "It's not allowed to place a block"
        cancel event

This is a very basic set of codes as you see, but when I tried to reload the file but there came an error!
It said
Code:
Line 2: (블럭설치.sk)
There are multiple command senders in an on place event. You must define which command sender to use.
Line: message "It's not allowed to place a block"

[Skript] Encountered 1 error while reloading 블럭설치.sk! (27ms)

Never mind "블럭설치". It's just the name of the script file.
I guessed that maybe 'message' keward should be related to the error so I changed it into 'broadcast' and it worked without an error!


So, I guess 'message' caused this error. Please tell me what is the problem exactly and what should I do to solve this situation.
In addition, my skript plugin's version is 2.8.2
 

Attachments

  • 스크립트 에러.PNG
    스크립트 에러.PNG
    51 KB · Views: 99
do message "It's not allowed to place a block" to player
Wow It works! Thank you so much!! BTW, I saw a skript lesson video in youtube to learn skript and there, he wrote the codes as I did but in his case, it worked! Can you tell me what's the difference? Is it the difference of the version? Maybe my skript version has been updated to put receiver at the end of the 'message' codes?