개인 자료란 (JE)

  서버 커뮤니티

Profile 고추마요 대표칭호 없음
Profile

질문하기 스크립트

오류좀 봐주세요

2020.07.22 조회 수 307 추천 수 0
이해도 1.12 
게임버전 (JE) 모드버킷 
스크립트 애드온 2.2 dev-37c 

catserver쓰고있어요


상점스크립트인데 한줄이 에러가떠요ㅠㅠ


if arg 1 is "열기":

            if arg 2 is set:

                if {상점목록::%arg-2%} is set:

                    open "CHEST" with {상점라인.%arg 2%} row named "{@c} &f%arg 2%" to player

                    wait 1 tick

                    loop {상점라인.%arg-2%}*9 times:

                        add 1 to {_슬롯}

                        if {상점물품가격.%arg-2%::%{_슬롯}%} is set:

                            set slot {_슬롯}-1 of current inventory of player to {상점물품.%arg-2%::%{_슬롯}%}

                            if {상점물품가격.%arg-2%::%{_슬롯}%} is set:

                                delete {_lore::*}

                                set {_item} to {상점물품.%arg-2%::%{_슬롯}%}

                                add "" to {_lore::*}

                                add "&c[ &f구매 &c] &f%{상점물품구매.%arg-2%::%{_슬롯}%}%" to {_lore::*}

                                add "&c[ &f판매 &c] &f%{상점물품판매.%arg-2%::%{_슬롯}%}%" to {_lore::*}

                                add "" to {_lore::*}

                                add "&8[ &f사용방법 &8]" to {_lore::*}

                                add " &7- &e좌클릭 &f시 물품을 &c구매&f합니다." to {_lore::*}

                                add " &7- &e우클릭 &f시 물품을 &c판매&f합니다." to {_lore::*}

                                add " &7- &e쉬프트 + 좌클릭 &f시 한세트를 &c구매&f합니다." to {_lore::*}

                                add " &7- &e쉬프트 + 우클릭 &f시 물품을 모두 &c판매&f합니다." to {_lore::*}

                                set {_item}'s lore to {_lore::*} < 에러뜨는 부분

                                set slot {_슬롯}-1 of current inventory of player to {_item}

                            #set line 1 of lore of slot {_슬롯}-1 of player's current inventory to ""

                            #set line 2 of lore of slot {_슬롯}-1 of player's current inventory to "&c[ &f구매 &c] &f%{상점물품구매.%arg-2%::%{_슬롯}%}%"

                            #set line 3 of lore of slot {_슬롯}-1 of player's current inventory to "&c[ &f판매 &c] &f%{상점물품판매.%arg-2%::%{_슬롯}%}%"

                            #set line 4 of lore of slot {_슬롯}-1 of player's current inventory to ""

                            #set line 5 of lore of slot {_슬롯}-1 of player's current inventory to "&8[ &f사용방법 &8]"

                            #set line 6 of lore of slot {_슬롯}-1 of player's current inventory to " &7- &e좌클릭 &f시 물품을 &c구매&f합니다."

                            #set line 7 of lore of slot {_슬롯}-1 of player's current inventory to " &7- &e우클릭 &f시 물품을 &c판매&f합니다."

                            #set line 8 of lore of slot {_슬롯}-1 of player's current inventory to " &7- &e쉬프트 + 좌클릭 &f시 한세트를 &c구매&f합니다."

                            #set line 9 of lore of slot {_슬롯}-1 of player's current inventory to " &7- &e쉬프트 + 우클릭 &f시 한세트를 &c판매&f합니다."

                        else:

                            set slot {_슬롯}-1 of current inventory of player to {상점물품.%arg-2%::%{_슬롯}%}

                    stop



 [Server thread/ERROR]: the lore of {_item} can only be set to one text, not more (상점.sk, line 61: set {_item}'s lore to {_lore::*}') 이렇게 뜨는데 어떻게 고쳐야 하나요?ㅠㅠ

1개의 댓글

스크립터브혼
2020.07.22
loop {_lore::*} times:
    set line loop-number of lore of {_item} to {_lore::%loop-number%}

이렇게 바꾸세요. 1.12 이하 버전은 lore가 배열형태로 되어있지 않습니다.
로어의 각 줄을 '||'를 구분자로 사용합니다.


// pattern 1
set line 1 of lore of {_item} to "Line-1"
set line 2 of lore of {_item} to "Line-2"
set line 3 of lore of {_item} to "Line-3"


// pattern 2
set lore of {_item} to "Line-1||Line-2||Line-3"

두 패턴은 서로 같습니다.

뉴스 및 창작물
/files/thumbnails/576/775/003/262x150.crop.jpg?20240426232553

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0

/files/thumbnails/115/774/003/262x150.crop.jpg?20240426223813

업데이트

마인크래프트 1.20.5 정식 업데이트

학교가기싫다

2024-04-24

0

/files/thumbnails/762/770/003/262x150.crop.jpg?20240418073724

레드스톤

T.B.H (고민중독) | 노트블럭 버전 | NoteBlock Cover [한국어 영어 중국어 가사 추가]

노트블럭전문가

2024-04-18

0

/files/thumbnails/218/767/003/262x150.crop.jpg?20240412130213

레드스톤

우리의 꿈 - 원피스 오프닝

노트블럭전문가

2024-04-12

0

/files/thumbnails/505/766/003/262x150.crop.jpg?20240411122306

레드스톤

기동전사 건담 수성의 마녀 | 노트블럭 커버 1

노트블럭전문가

2024-04-11

1