일단 이 코드를 만들고 나서 해당 현상이 일어나서 첨부함.
on inventory close:
if name of event-inventory contain "&c&l[&a&l☆상점":
set {_shop_set} to chest inventory with 1 rows named "&c&l[&a&l상점 관리창&c&l]&f"
set slot 1 of {_shop_set} to book named "&9아이템 설정" with lore "&7상점의 아이템을 관리함."
set slot 3 of {_shop_set} to emerald named "&9가격 설정" with lore "&7아이템의 가격을 관리함."
set slot 5 of {_shop_set} to chest named "&9상점 열기" with lore "&7상점을 염."
set slot 7 of {_shop_set} to barrier named "&c닫기" with lore "&7관리 창을 닫음."
open {_shop_set} to player
원래 의도는 관리창에서 세부탭에 들어감->그 세부탭을 e를 사용하여 종료할시 다시 관리탭으로 귀한
오류 내역 첨부 부탁드림
오류가 서버 창에서만 뜨는거고 그 길이가 너무 길어서 첨부 불가능할듯 함
해당 구문 만으로는 오류 파악이 어려움. 따로 전체 구문을 올려줘야 함
일단 관련 구문들 전부 올려드리겠음
function shop(s: integer, name: text, p: player): set {_endglass} to 0 set {_n} to 0 if {_s} isn't 1: set {_s2} to {_s}*45 loop 45 times: if {_s} isn't 1: set slot {_n} of current inventory of {_p} to air if name of {_p}' current inventory don't contain "&c&l[&a&l상점 아이템설정&c&l]&f": set {_buy} to {상점리스트::구매가격::%{_name}%::%{_n} + {_s2}%} set {_sell} to {상점리스트::판매가격::%{_name}%::%
{_n} + {_s2}%} if {_buy} < 0: set {_buy} to "구매불가" if {_sell} < 0: set {_sell} to "판매불가" set {_item} to 1 of {상점리스트::아이템::%{_name}%::%{_n} + {_s2}%} add "%nl%&c구매가격 &f: &b%{_buy}%%nl%&a판매가격 &f: &b%{_sell}%%nl%%nl%&c좌클릭 : 1개 구매%nl%&c쉬프트 + 좌클릭 : 64개 구매%nl%&a우클릭 : 1개 판매%nl%&a쉬프트 + 우클릭 : 64개 판매" to lore of {_item} set slot {_n} of current inventory of {_p} to {_item} e
lse: set slot {_n} of current inventory of {_p} to 1 of {상점리스트::아이템::%{_name}%::%{_n} + {_s2}%} else: set slot {_n} of current inventory of {_p} to air if name of {_p}' current inventory don't contain "&c&l[&a&l상점 아이템설정&c&l]&f": set {_buy} to {상점리스트::구매가격::%{_name}%::%{_n}%} set {_sell} to {상점리스트::판매가격::%{_name}%::%{_n}%} if {_buy} < 0: set {_buy} to "구매불가" if {_se
ll} < 0: set {_sell} to "판매불가" set {_item} to 1 of {상점리스트::아이템::%{_name}%::%{_n}%} add "%nl%&c구매가격 &f: &b%{_buy}%%nl%&a판매가격 &f: &b%{_sell}%%nl%%nl%&c좌클릭 : 1개 구매 %nl%&c쉬프트 + 좌클릭 : 64개 구매%nl%&a우클릭 : 1개 판매 %nl%&a쉬프트 + 우클릭 : 64개 판매" to lore of {_item} set slot {_n} of current inventory of {_p} to {_item} else: set slot {_n} of current inventory of {_p} to 1 of {상점리스트::아이템::%{_n
ame}%::%{_n}%} add 1 to {_n} loop 9 times: set slot {_endglass} + 45 of current inventory of {_p} to dark gray stained glass pane named "&f" add 1 to {_endglass} set slot 48 of current inventory of {_p} to arrow named "&c전 페이지 (%{_s} - 1%)" set slot 49 of current inventory of {_p} to white stained glass pane named "&b%{_s}%" set slot 50 of current inventory of {_p} to arrow named "&2다음
페이지 (%{_s} + 1%)" set slot 53 of current inventory of {_p} to head of {_p} named "&5&l정보" with lore "&7닉네임 &f: &2%{_p}% %nl%&a보유금액 &f: &6%{돈::%{_p}%}%" play sound "entity_experience_orb_pickup" with volume 100 and pitch 1 for {_p}
command /상점 [<text>] [<text>]: trigger: if player is op: if arg 1 is "생성": loop {상점리스트::이름::*}: if "%loop-value%" is arg 2: message "{@오류} 해당 상점은 이미 존재함." stop add arg 2 to {상점리스트::이름::*} message "{@설명} [%arg 2%]상점을 만들었음." else if arg 1 is "제거": if {상점리스트::이름::*} don't contain arg 2: message "{@오류} 해당 상점은 존재하지 않음." else: remove arg 2 from {상점
리스트::이름::*} delete {상점리스트::아이템::%arg 2%::*} delete {상점리스트::구매가격::%arg 2%::*} delete {상점리스트::판매가격::%arg 2%::*} message "{@설명} [%arg 2%]상점을 삭제했음." else if arg 1 is "설정": if {상점리스트::이름::*} don't contain arg 2: message "{@오류} 해당 상점은 존재하지 않음." else: set {_shop_set} to chest inventory with 1 rows named "&c&l[&a&l상점 관리창&c&l]&f" set slot 1 of {_shop_set} to bo
ok named "&9아이템 설정" with lore "&7상점의 아이템을 관리함." set slot 3 of {_shop_set} to emerald named "&9가격 설정" with lore "&7아이템의 가격을 관리함." set slot 5 of {_shop_set} to chest named "&9상점 열기" with lore "&7상점을 염." set slot 7 of {_shop_set} to barrier named "&c닫기" with lore "&7관리 창을 닫음." open {_shop_set} to player set {shop_imsi} to arg 2 else if arg 1 is "사용" : set {_shop_open}
to chest inventory with 6 rows named "&c&l[&a&l상점&c&l]&f %arg 2%" open {_shop_open} to player shop(1, arg 2,player) else : message "{@설명}/상점 생성 [상점이름]" message "{@설명}/상점 제거 [상점이름]" message "{@설명}/상점 설정 [상점이름]" message "{@설명}/상점 사용 [상점이름]" else: message "&l&c해당 명령어를 사용할 권한이 없음."
on inventory click : event-inventory's name is "&c&l[&a&l상점 관리창&c&l]&f" : cancel event event-inventory is player's inventory : stop clicked slot is 1: set {_shop_set_item} to chest inventory with 6 rows named "&c&l[&a&l상점 아이템설정&c&l]&f %{shop_imsi}%" open {_shop_set_item} to player shop(1, {shop_imsi}, player) clicked slot is 3: set {_shop_set_cost} to chest inventory with
6 rows named "&c&l[&a&l상점 가격설정&c&l]&f %{shop_imsi}%" open {_shop_set_cost} to player shop(1, {shop_imsi}, player) clicked slot is 5: set {_shop_set_open} to chest inventory with 6 rows named "&c&l[&a&l상점&c&l]&f %{shop_imsi}%" open {_shop_set_open} to player shop(1, {shop_imsi},player) clicked slot is 7: close player's inventory
on inventory close: if name of event-inventory contain "&c&l[&a&l상점 아이템설정&c&l]&f": set {_page} to uncolored name of slot 49 of current inventory set {_page} to "%{_page}%" parsed as integer set {_name} to uncolored name of event-inventory replace "[상점 아이템설정] " with "" in {_name} set {_n} to 0 if {_page} isn't 1: set {_page2} to {_page}*45 loop 45 times: if {_page} isn't 1:
set {상점리스트::아이템::%{_name}%::%{_n} + {_page2}%} to slot {_n} of current inventory else: set {상점리스트::아이템::%{_name}%::%{_n}%} to slot {_n} of current inventory add 1 to {_n} if name of event-inventory contain "&c&l[&a&l☆상점": set {_shop_set} to chest inventory with 1 rows named "&c&l[&a&l상점 관리창&c&l]&f" set slot 1 of {
_shop_set} to book named "&9아이템 설정" with lore "&7상점의 아이템을 관리함." set slot 3 of {_shop_set} to emerald named "&9가격 설정" with lore "&7아이템의 가격을 관리함." set slot 5 of {_shop_set} to chest named "&9상점 열기" with lore "&7상점을 염." set slot 7 of {_shop_set} to barrier named "&c닫기" with lore "&7관리 창을 닫음."
open {_shop_set} to player
어떠한 행동을 하였을 때, 서버가 강제로 종료가 된 거임?
관리창에서 아이템 추가든 가격 변경이든 세부탭에 들어간 상태에서 e키를(esc는 사용 안해봄) 사용하여 창을 닫는 순간 서버가 다운되버림
올려준 구문에서는 "if name of event-inventory contain "&c&l[&a&l☆상점":" 라는 구문이 작동될 이유가 없는데, 구문이 있는 이유가 있을까?
관리창으로 열린 탭만 닫을때 다시 관리창이 켜지는 형식으로 만들고 싶었음 /상점 사용 테스트 이런식으로 열린 탭에 대해서는 열리지 않도록말이지 저 ☆은 그냥 그 기능을 위해서 임시로 넣어본 기호라 아이템 저장기능이랑은 좀 오류가나긴 하다만은 저장구문 제거해도 해당오류가 남
모든 인벤토리에 "&c&l[&a&l상점" 라는 텍스트가 포함되어 있어, 관리창을 open 하게 되면 이미 열고 있는 인벤토리도 텍스트가 포함이라 해당 인벤토리가 닫히면서 또 한 번 이벤트를 불러와 이벤트가 무한으로 적용되어 서버가 터지는 것일 수도 있음
invetory close에서 인벤토리 열때 그 앞에 wait a tick 추가해봐
첨푸는 TXT파일도 됨..
오우... 차라리 txt 파일로 첨부파일에 넣는게 어떨까
해결했음. ㄳ