개인 자료란 (JE)

  서버 커뮤니티

Profile 현준s 대표칭호 없음

hyunjuns efb78f3c34e24c0cac20441bd904b228

Profile

질문하기 스크립트

주식스크립트 판매 오류

2022.09.03 조회 수 54 추천 수 0
게임버전 (JE) 플러그인 
게임버전 (BE) 기타 

on inventory click:

    if iname is "&c주식":

        cancel event

        if clicked item is not black stained glass pane:

            set {_stock} to uncolored name of clicked item

            replace all " 주식" with "" in {_stock}

            if clicked type is left mouse button:

                if player's money is not smaller than {주식가격::%{_stock}%}:

                    subtract {주식가격::%{_stock}%} from player's money

                    add 1 to {주식.%uuid of player%::%{_stock}%}

                    play sound "entity.experience_orb.pickup" with volume 0.5 to the player

                else:

                    play sound "UI_SUTTON_CLICK" with volume 0.5 to the player

                    message "&c돈이 부족합니다!"

                if clicked type is left mouse button with shift:

                    if player's money is not smaller than {주식가격::%{_stock}%}*10:

                        subtract {주식가격::%{_stock}%}*10 from player's money

                        add 100 to {주식.%uuid of player%::%{_stock}%}

                        play sound "entity.experience_orb.pickup" with volume 0.5 to the player

                    else:

                        play sound "UI_SUTTON_CLICK" with volume 0.5 to the player

                        message "&c돈이 부족합니다!"

                if clicked type is right mouse button:

                    if {주식.%uuid of player%::%{_stock}%} is bigger than 0:

                        add {주식가격::%{_stock}%} to player's money

                        subtract 1 from {주식.%uuid of player%::%{_stock}%}

                        play sound "entity.experience_orb.pickup" with volume 0.5 to the player

                    else:

                        play sound "UI_SUTTON_CLICK" with volume 0.5 to the player

                        message "&c주식이 부족합니다!"

                if clicked type is right mouse button with shift:

                    if {주식.%uuid of player%::%{_stock}%} is bigger than 0:

                        add {주식가격::%{_stock}%}*{주식.%uuid of player%::%{_stock}%} to player's money

                        set {주식.%uuid of player%::%{_stock}%} to 0

                        play sound "entity.experience_orb.pickup" with volume 0.5 to the player

                        message "&c주식을 모두 판매하였습니다!"

                    else:

                        play sound "UI_SUTTON_CLICK" with volume 0.5 to the player

                        message "&c주식이 부족합니다!"

                    make player execute command "/주식확인"


오류가 나는부분은 없는데 우클릭시 판매, 쉬프트해서 100개 구매가 되지않습니다
구문에 문제가 있을까요?

2개의 댓글

qsef1256
2022.09.04

들여쓰기가 좀 이상하네요. if clicked type is left mouse button with shift:if clicked type is left mouse button: 밑에 있는데요?

qsef1256
2022.09.04

파이썬 같은 들여쓰기는 스페이스가 중괄호 대체 문구라 매우 중요해요. 이와 같이 논리 구조가 꼬여서 실행이 안될 수도 있어요

뉴스 및 창작물
/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