개인 자료란 (JE)

  서버 커뮤니티

Profile qjdurh03 대표칭호 없음
Profile

질문하기 스크립트

마인크래프트 gui메뉴 명령어 작동 오류

2022.07.21 조회 수 413 추천 수 0
이해도 입문자(아무것도 몰라요) 
게임버전 (JE) 1.12.2 
게임버전 (BE) 관련없음 

1.12.2에서 gui메뉴 스크립트를 사용하고 있는데 명령어를 칸수에 맞게 설정하고 누르면 unknown command type help for help

가 나옵니다. 무엇이 문제고 어떻게 고쳐야할까요?

[05:41:15] [Server thread/ERROR]: [Skript] the clicked slot is not a number (커스텀GUI (1).sk, line 183: if {gui.command.%{_STR.name_%player%}%::%clicked slot+1%} is not set:')

[05:41:15] [Server thread/ERROR]: [Skript] the clicked slot is not a number (커스텀GUI (1).sk, line 185: set {_command} to {gui.command.%{_STR.name_%player%}%::%clicked slot+1%}')

options:

    p: &b[ &f&lGui &b]

command /Gui [<string>] [<string>] [<integer>] [<string>]:

    permission: sk.gui

    trigger:

        if arg 1 is not set:

            send "{@p} &f/GUI 열기 <이름>  &f&l해당 GUI를 엽니다."

            send "{@p} &f/GUI 목록  &f&lGUI 목록을 확인 합니다."

            player has permission "sk.gui":

                send ""

                send "{@p} 관리자 전용 커맨드"

                send "{@p} &f/GUI 생성 <이름> <줄수> &f&lGUI를 만듭니다."

                send "{@p} &f/GUI 설정 <이름>  &f&lGUI를 설정 합니다."

                send "{@p} &f/GUI 삭제 <이름>  &f&lGUI를 삭제 합니다."

                send "{@p} &f/GUI 커맨드설정 <이름> <슬롯> <커맨드>  &f&l해당 GUI의 슬롯 커맨드를 설정 합니다."

                send "{@p} &f/GUI 커맨드초기화 <이름>  &f&l해당 GUI의 커맨드를 모두 초기화 합니다."

            stop

        if arg 1 is not "열기" or "목록" or "생성" or "설정" or "삭제" or "커맨드설정" or "커맨드초기화":

            send "{@p}  Made by &dAhyon"

            send ""

            send "{@p} &b&l/GUI 열기 <이름>  &f&l해당 GUI를 엽니다."

            send "{@p} &b&l/GUI 목록  &f&lGUI 목록을 확인 합니다."

            player has permission "sk.gui":

                send ""

                send "{@p} 관리자 전용 커맨드"

                send "{@p} &f/GUI 생성 <이름> <줄수>  &f&lGUI를 만듭니다."

                send "{@p} &f/GUI 설정 <이름>  &f&lGUI를 설정 합니다."

                send "{@p} &f/GUI 삭제 <이름>  &f&lGUI를 삭제 합니다."

                send "{@p} &f/GUI 커맨드설정 <이름> <슬롯> <커맨드>  &f&l해당 GUI의 슬롯 커맨드를 설정 합니다."

                send "{@p} &f/GUI 커맨드초기화 <이름>  &f&l해당 GUI의 커맨드를 모두 초기화 합니다."

            stop

        if arg 1 is "열기":

            if arg 2 is not set:

                send "{@p} GUI 이름을 적어주세요."

                stop

            loop {gui.list::*}:

                if "%loop-value%" is arg 2:

                    set {_BOOL.a} to true

                    exit 2 sections

            if {_BOOL.a} is set:

                open chest with {gui.line.%arg 2%} row named "&b[ &f&lGui &b]-%arg 2%" to player

                wait 1 tick

                if inventory name of current inventory of player is not "&b[ &f&lGui &b]-%arg 2%":

                    exit

                loop {gui.item.%arg 2%::*}:

                    add 1 to {_INT.%player%}

                    if loop-value is not air:

                        if loop-value is glass pane:

                            set slot {_INT.%player%}-1 of current inventory of player to loop-value named "{@p}"

                        else:

                            set slot {_INT.%player%}-1 of current inventory of player to loop-value

            else:

                send "{@p} 존재 하지 않는 GUI 입니다."

                stop

        if arg 1 is "목록":

            send "{@p} GUI 목록"

            loop {gui.list::*}:

                add 1 to {_i}

                send "&b&l[ &f&l%{_i}% &b&l]  &f&l%loop-value% [ &b&l%{gui.line.%loop-value%}% &f&l]"

        if arg 1 is "생성":

            player don't have permission "sk.gui":

                send "{@p} 권한이 없습니다."

                stop

            if arg 2 is not set:

                send "{@p} 생성할 GUI 이름을 적어 주세요."

                stop

            if arg 3 is not set:

                send "{@p} 줄수를 적어 주세요."

                stop

            if arg 3 > 6:

                send "{@p} 줄수 범위를 초과 하였습니다."

                stop

            if arg 3 < 1:

                send "{@p} 줄수 범위를 초과 하였습니다."

                stop

            loop {gui.list::*}:

                if "%loop-value%" is arg 2:

                    send "{@p} 이미 존재하는 GUI 입니다."

                    stop

            set {_last} to number of {gui.list::*}+1

            set {gui.list::%{_last}%} to arg 2

            set {gui.line.%arg 2%} to arg 3

            send "{@p} &e&l%arg 2% &f&lGUI을 만들었습니다. [ &b&l%arg 3% &f&l]"

        if arg 1 is "설정":

            player don't have permission "sk.gui":

                send "{@p} 권한이 없습니다."

                stop

            if arg 2 is not set:

                send "{@p} 설정할 GUI 이름을 적어 주세요."

                stop

            loop {gui.list::*}:

                if "%loop-value%" is arg 2:

                    set {_BOOL.a} to true

                    exit 2 sections

            if {_BOOL.a} is set:

                wait 1 tick

                open chest with {gui.line.%arg 2%} row named "GUI설정-%arg 2%" to player

                wait 3 tick

                loop {gui.item.%arg 2%::*}:

                    add 1 to {_INT.%player%}

                    set slot {_INT.%player%}-1 of current inventory of player to loop-value

            else:

                send "{@p} 존재 하지 않는 GUI 입니다."

                stop

        if arg 1 is "삭제":

            player don't have permission "sk.gui":

                send "{@p} 권한이 없습니다."

                stop

            if arg 2 is not set:

                send "{@p} 삭제할 GUI 이름을 적어 주세요."

                stop

            loop {gui.list::*}:

                if "%loop-value%" is arg 2:

                    set {_i} to loop-index parsed as integer

                    set {_plus} to {_i}+1

                    while {gui.list::%{_plus}%} is set:

                        set {gui.list::%{_i}%} to {gui.list::%{_plus}%}

                        add 1 to {_i}

                    delete {gui.list::%{_i}%}

                    delete {gui.command.%arg 2%::*}

                    delete {gui.item.%arg 2%::*}

                    delete {gui.line.%arg 2%}

                    send "{@p} &e&l%arg 2% &f&lGUI을 삭제 했습니다."

                    stop

            send "{@p} 존재 하지 않는 GUI 입니다."

        if arg 1 is "커맨드설정":

            player don't have permission "sk.gui":

                send "{@p} 권한이 없습니다."

                stop

            if arg 2 is not set:

                send "{@p} 설정할 GUI 이름을 적어 주세요."

                stop

            if arg 3 is not set:

                send "{@p} 설정할 슬롯을 적어 주세요."

                stop

            if arg 4 is not set:

                send "{@p} 설정할 커맨드를 적어 주세요."

                stop

            if arg 3 > 9*{gui.line.%arg 2%}:

                send "{@p} 슬롯 범위를 초과 하였습니다."

                stop

            if arg 3 < 1:

                send "{@p} 슬롯 범위를 초과 하였습니다."

                stop

            loop {gui.list::*}:

                if "%loop-value%" is arg 2:

                    set {_BOOL.a} to true

                    exit 2 sections

            if {_BOOL.a} is set: 

                set {gui.command.%arg 2%::%arg 3%} to arg 4

                send "{@p} &e&l%arg 2% &f&lGUI의 &a&l%arg 3% &f&l번 슬롯의 커맨드를 &b&l[ /%{gui.command.%arg 2%::%arg 3%}% ] &f&l로 설정 하였습니다."

            else:

                send "{@p} 존재 하지 않는 GUI 입니다."

                stop

        if arg 1 is "커맨드초기화":

            player don't have permission "sk.gui":

                send "{@p} 권한이 없습니다."

                stop

            if arg 2 is not set:

                send "{@p} 초기화할 GUI 이름을 적어 주세요."

                stop

            loop {gui.list::*}:

                if "%loop-value%" is arg 2:

                    set {_BOOL.a} to true

                    exit 2 sections

            if {_BOOL.a} is set: 

                delete {gui.command.%arg 2%::*}

                send "{@p} &e&l%arg 2% &f&lGUI의 커맨드설정을 모두 초기화 하였습니다."

            else:

                send "{@p} 존재 하지 않는 GUI 입니다."

                stop

on inventory click:

    if inventory name of current inventory of player contains "&b[ &f&lGui &b]":

        cancel event

        wait 2 tick

        update inventory player

        if clicked raw slot is not clicked slot:

            exit

        if click item is air:

            exit

        set {_STR.name::*} to uncolored inventory name of current inventory of player split at "-"

        set {_STR.name_%player%} to {_STR.name::2}

        if {gui.command.%{_STR.name_%player%}%::%clicked slot+1%} is not set:

            exit

        set {_command} to {gui.command.%{_STR.name_%player%}%::%clicked slot+1%}

        replace all "<player>" with "%player%" in {_command}

        close player's inventory

        wait 1 tick

        run player command "/%{_command}%" as op

        

on inventory close:

    if uncolored inventory name of event-inventory contains "GUI설정":

        set {_splited::*} to uncolored inventory name of event-inventory split at "-"

        set {_name} to {_splited::2}

        delete {gui.item.%{_name}%::*}

        set {_loop} to 9*{gui.line.%{_name}%}

        loop {_loop} times:

            add 1 to {_INT.%player%}

            set {gui.item.%{_name}%::%{_INT.%player%}%} to slot {_INT.%player%}-1 of event-inventory

        send "{@p} &e&l%{_name}% &f&lGUI가 설정 되었습니다."



2개의 댓글

qsef1256
2022.07.21

 clicked slot -> index of clicked slot

하얀눈
2022.08.14
@qsef1256

엄청 감사합니다 예전에 스파게티 어쩌고라고 돈스크립트 연동글에 답글달아주셔서 일찌감찌 포기하고 제가 직접 퀄리티 높게 만들어서 잘 작동하고 쓰고있어요 한마포 글어디를 가도 거의 계속 보일정도로 활동하고 계시네요! 모 블로그에서 배포하고있는 커스텀 gui 스크립트를 가져와서 쓰려했는데 작동을 안해서 에러 나오는 구문만 쳐서 들어왔는데 한마포가 보이길래 들어왔더니 익숙한 닉네임이 계시더라구욬ㅎㅋ!! 글쓴이는 아니지만 조언 정말 감사해요

 

뉴스 및 창작물
/files/thumbnails/115/774/003/262x150.crop.jpg?20240424234825

업데이트

마인크래프트 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

/files/thumbnails/932/765/003/262x150.crop.jpg?20240410124459

레드스톤

마인크래프트 노트블록으로 만든 『 밤양갱 (Bam Yang Gang) 』

노트블럭전문가

2024-04-10

0