개인 자료란 (JE)

  서버 커뮤니티

Profile 바람의너를 대표칭호 없음

windwolf0 eb03c9f65da24c338ffbbc8703e369b8

Profile

질문하기 스크립트

주식스크립트 구매구문과 판매구문이 작동하지 않습니다.

2021.10.14 조회 수 398 추천 수 0
이해도 초보자(스크립트 구성요소나 기본문법은 알아요) 
게임버전 (JE) 1.12.2 
게임버전 (BE) 관련없음 
스크립트 버전 2.2-dev27 

주식스크립트를  캣서버 버킷에서 구동시키려하는대 주식 구매와 판매가 안됩니다.
자체변수가아닌 이코노미플러그인을 이용하고있습니다. 혹시 어느부분이 문제인지 알려주세요..

on inventory click:

    if inventory name of current inventory of player is "{@s}":

        cancel event

        if raw slot < 36:

            if click item is not air:

                if click type is left click:

                    set {_lore::*} to lore of click item split by "||"

                    set {_money} to uncolored {_lore::2}

                    replace all "[" and "가격" and "]" and " " and "원" with "" in {_money}

                    set {_money} to uncolored {_money} parsed as integer

                    if player's money >= {_money}:

                        remove {_money} from player's money

                        set slot 53 of current inventory of player to emerald named "&e[ &f돈 &e]" with lore "&cㄴ &f player's money &c원"

                        give 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%" to player

                        message ""

                        message "{@s} &f당신은 &e%{_money}% &f원을 사용하여 %{stock::%clicked slot+1%}% &f을 &c구매&f하였습니다."

                        message ""

                        stop

                        

                if click type is right click:

                    set {_lore::*} to lore of click item split by "||"

                    set {_money} to uncolored {_lore::2}

                    replace all "[" and "가격" and "]" and " " and "원" with "" in {_money}

                    set {_money} to uncolored {_money} parsed as integer

                    remove 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%" from player's inventory

                    add {_money} to player's money

                    set slot 53 of current inventory of player to emerald named "&e[ &f돈 &e]" with lore "&cㄴ &f player's money &c원"

                    message ""

                    message "{@s} &f당신은 %{stock::%clicked slot+1%}% &f을 &c판매&f하여 &e%{_money}% &f를 얻었습니다."

                    message ""

                    




19개의 댓글

거너아나
2021.10.15

clicked item

if clicked type is left mouse button:

바람의너를
2021.10.15
@거너아나

if raw slot < 36구문이 오류로 나오고있는대 혹시 문제점이 뭔지 아시나요..?

거너아나
2021.10.15
@바람의너를

그냥 clicked slot을 쓰세요

바람의너를
2021.10.15
@거너아나

on inventory click:

if inventory name of current inventory of player is "{@s}":

cancel event

clicked slot

clicked item

if clicked type is left mouse button:

set {_lore::*} to lore of click item split by "||"

set {_money} to uncolored {_lore::2}

replace all "[" and "가격" and "]" and " " and "원" with "" in {_money}

set {_money} to uncolored {_money} parsed as integer

if %player's money% >= {_money}:

remove {_money} from %player's money%

set slot 53 of current inventory of player to emerald named "&e[ &f돈 &e]" with lore "&cㄴ &f %player's money% &c원"

give 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%" to player

message ""

message "{@s} &f당신은 &e%{_money}% &f원을 사용하여 %{stock::%clicked slot+1%}% &f을 &c구매&f하였습니다."

message ""

stop

if click type is right mouse button:

set {_lore::*} to lore of click item split by "||"

set {_money} to uncolored {_lore::2}

replace all "[" and "가격" and "]" and " " and "원" with "" in {_money}

set {_money} to uncolored {_money} parsed as integer

remove 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%" from player's inventory

add {_money} to %player's money%

set slot 53 of current inventory of player to emerald named "&e[ &f돈 &e]" with lore "&cㄴ &f %player's money% &c원"

message ""

message "{@s} &f당신은 %{stock::%clicked slot+1%}% &f을 &c판매&f하여 &e%{_money}% &f를 얻었습니다."

message ""

제가 구문수정를 잘못한건지 오류메세지가 더늘어났습니다.. 혹시 어느부분을 잘못수정한건지 봐주실수있으신가요..?

거너아나
2021.10.15
@바람의너를

오류 메시지는요?

바람의너를
2021.10.15
@거너아나

clicked item

 

if clicked type is left mouse button:

 

set {_lore::*} to lore of click item split by "||"

 

set {_money} to uncolored {_lore::2}

 

replace all "[" and "가격" and "]" and " " and "원" with "" in {_money}

 

set {_money} to uncolored {_money} parsed as integer

 

if %player's money% >= {_money}:

 

remove {_money} from %player's money%

 

set slot 53 of current inventory of player to emerald named "&e[ &f돈 &e]" with lore "&cㄴ &f %player's money% &c원"

 

give 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%" to player

 

message ""

 

message "{@s} &f당신은 &e%{_money}% &f원을 사용하여 %{stock::%clicked slot+1%}% &f을 &c구매&f하였습니다."

 

message ""

 

stop

 

if click type is right mouse button:

 

set {_lore::*} to lore of click item split by "||"

 

set {_money} to uncolored {_lore::2}

 

replace all "[" and "가격" and "]" and " " and "원" with "" in {_money}

 

set {_money} to uncolored {_money} parsed as integer

 

remove 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%" from player's inventory

 

add {_money} to %player's money%

 

set slot 53 of current inventory of player to emerald named "&e[ &f돈 &e]" with lore "&cㄴ &f %player's money% &c원"

 

message ""

 

message "{@s} &f당신은 %{stock::%clicked slot+1%}% &f을 &c판매&f하여 &e%{_money}% &f를 얻었습니다."

 

message ""

이렇게 오류메세지로 나옵니다

 

거너아나
2021.10.15
@바람의너를

이게 오류 메세지라고요?

바람의너를
2021.10.15
@거너아나

indentation error: expected 2 tabs, but found 3 tabs (주식.sk, line 178: if clicked type is left mouse button:')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 4 tabs (주식.sk, line 179: set {_lore::*} to lore of click item split by "||"')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 4 tabs (주식.sk, line 180: set {_money} to uncolored {_lore::2}')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 181: replace all "[" and "가격" and "]" and " " and "원" with "" in {_money}')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 4 tabs (주식.sk, line 182: set {_money} to uncolored {_money} parsed as integer')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 183: if %player's money% >= {_money}:')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 184: remove {_money} from %player's money%')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 185: set slot 53 of current inventory of player to emerald named "&e[ &f돈 &e]" with lore "&cㄴ &f %player's money% &c원"')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 186: give 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%" to player')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 187: message ""')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 188: message "{@s} &f당신은 &e%{_money}% &f원을 사용하여 %{stock::%clicked slot+1%}% &f을 &c구매&f하였습니다."')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 189: message ""')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 190: stop')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 4 tabs (주식.sk, line 192: if click type is right mouse button:')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 193: set {_lore::*} to lore of click item split by "||"')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 194: set {_money} to uncolored {_lore::2}')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 195: replace all "[" and "가격" and "]" and " " and "원" with "" in {_money}')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 196: set {_money} to uncolored {_money} parsed as integer')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 197: remove 1 of {stockitem::%clicked slot+1%} named "%{stock::%clicked slot+1%}%" from player's inventory')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 198: add {_money} to %player's money%')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 199: set slot 53 of current inventory of player to emerald named "&e[ &f돈 &e]" with lore "&cㄴ &f %player's money% &c원"')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 200: message ""')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 201: message "{@s} &f당신은 %{stock::%clicked slot+1%}% &f을 &c판매&f하여 &e%{_money}% &f를 얻었습니다."')

[20:36:52] [Server thread/ERROR]: indentation error: expected 2 tabs, but found 5 tabs (주식.sk, line 202: message ""')

[20:36:52] [Server thread/ERROR]: Can't understand this condition/effect: clicked item (주식.sk, line 177: clicked item')

거너아나
2021.10.15
@바람의너를

178~202 tab 문제

177줄은 뭐죠

바람의너를
2021.10.15
@거너아나

그 클릭아이템구문을 이해를 못한다는대요

 

거너아나
2021.10.15
@바람의너를

177줄 구문을 보여주세요

바람의너를
2021.10.15
@거너아나

clicked item

이거만 적혀있습니다 혹시 if를 붙여야하나요..?

거너아나
2021.10.15
@바람의너를

175~178까지 구문좀 보여주실 수 있으신가요?

바람의너를
2021.10.15
@거너아나

cancel event

 

clicked slot

 

clicked item

 

if clicked type is left mouse button:

이렇게 되있습니다

거너아나
2021.10.15
@바람의너를

if raw slot < 36:

 

if click item is not air: 이거 잘 써두고서

raw slot을 clicked slot으로

click item을 clicked item으로 바꾸란거였죠;;

바람의너를
2021.10.15
@거너아나

앗아... 감사합니다...내일 수정해보겠습니다..

바람의너를
2021.10.16
@거너아나

[18:06:44] [Server thread/ERROR]: can't understand this condition: '%player's money% >= {_money}' (주식.sk, line 184: if %player's money% >= {_money}:')

[18:06:44] [Server thread/ERROR]: Can't understand this condition/effect: remove {_money} from %player's money% (주식.sk, line 185: remove {_money} from %player's money%')

[18:06:44] [Server thread/ERROR]: Can't understand this condition/effect: add {_money} to %player's money% (주식.sk, line 199: add {_money} to %player's money%')

[18:06:44] [Server thread/ERROR]: Invalid use of quotes ("). If you want to use quotes in "quoted text", double them: "". (주식.sk, line 203: message "')

이렇게 오류가 나오고있고

184,185 구문

if %player's money% >= {_money}:

remove {_money} from %player's money%

199구문

add {_money} to %player's money%

203구문은 " 하나가 빠져있어서 끼웠습니다

거너아나
2021.10.16
@바람의너를

싹 다 % 빼세요

player's money는 이코노미 플러그인 변수라 % 안 써야되요

바람의너를
2021.10.16
@거너아나

아 감사합니다.

혹시 이렇게 뜨는 메세지가 있는대 괜찮을까요..?

[Server thread/WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (주식.sk, line 184: if player's money >= {_money}:')