Solved Syntax error with element of a list

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

siheng95

New Member
Mar 5, 2020
6
0
0
so i am new to skript (i started like 4 days ago) and i tryied creating treecapitator but i keep getting the Can´t undersrand... error on the first line. i searched everywhere and i think i got the right syntax so idk why it doesnt work


on break of <element of {woods::*}>:
loop all blocks in radius 1 around event-block:
if loop-block is arg 1:
break loop-block
else:
stop loop
 
Try

Code:
on break:
    if event-block is in {woods::*}:
        loop all blocks in radius 1 around event-block:
            if loop-block is arg 1:
                break loop-block
            else:
                stop loop
 
Code:
on break:
    set {_event-block} to event-block parsed as text
    if  {_event-block} is in {woods::*}:
        loop all blocks in radius 1 around event-block:
            if loop-block is arg 1:
                break loop-block
            else:
                stop loop

If you got an issue with the
Code:
parsed as text
remove it
 
it says this
[doublepost=1583453276,1583453246][/doublepost]sry for the download
[doublepost=1583453397][/doublepost]i just removed the parsed as text but there are still 2 errors
 

Attachments

  • skunity.png
    skunity.png
    35.2 KB · Views: 256
Code:
on break:
    set {_event_block} to event-block parsed as text
    if  {_event_block} contains {woods::*}:
        loop all blocks in radius 1 around event-block:
            if loop-block is {_event_block}:
                break loop-block
            else:
                stop loop

shrug
 
it loaded succesfully im trying it out
[doublepost=1583453991,1583453695][/doublepost]it only works for oak wood but i think i set my list correctly:
on script load:
set {woods} to "acacia log,birch log,spruce log,dark oak log,jungle log,oak log"
set {splitWoods::*} to {woods} split at ","
 
This will be easier
Code:
options:
    woods : acacia log or birch log or spruce logdark or oak log or jungle log or oak log

on break:
    if event-block is {@woods}:
        loop all blocks in radius 1 around event-block:
            if loop-block is {@woods}:
                break loop-block
            else:
                stop loop
 
Personally i use those blocks here you can also get horizontal logs ;°
Code:
oak wood block or spruce wood block or jungle wood block or acacia wood block or dark oak wood block or horizontal oak wood block or horizontal spruce wood block or horizontal jungle wood block or horizontal acacia wood block or horizontal dark oak wood block

so set options woods to this like

Code:
options:
    woods : oak wood block or spruce wood block or jungle wood block or acacia wood block or dark oak wood block or horizontal oak wood block or horizontal spruce wood block or horizontal jungle wood block or horizontal acacia wood block or horizontal dark oak wood block
[doublepost=1583455082,1583455007][/doublepost]If it's don't work for you go in plugins/skript/ and go in your aliases file and type CTRL + F and search log and in you aliases file you'll find every logs names :emoji_wink:
 
.
[doublepost=1583455187,1583455152][/doublepost]oh i didnt see the message underneath
 

Attachments

  • 456.png
    456.png
    49.1 KB · Views: 232
Status
Not open for further replies.