개인 자료란 (JE)

  서버 커뮤니티

Profile Ru_Nan 대표칭호 없음

Ru_Nan 642a599e50ad442cab0e91c0d4d2252a

Profile

질문하기 스크립트

구문 오류

2020.12.22 조회 수 560 추천 수 0
이해도 1.12 
게임버전 (JE) 모드버킷 
스크립트 버전 입문자(아무것도 몰라요) 
스크립트 애드온 2.2 dev36 

덕분에 도박스크립트는 완성시킬 수 있었습니다. 감사합니다!

3.sk 이 스크립트에서 

[18:56:45] [Server thread/ERROR]: There's no world in a periodic event if no world is given in the event (e.g. like 'every hour in "world"') (3.sk, line 57: set slot {_슬롯}-1 of current inventory of player to {_등록귀금속}')

이러한 오류가 나타납니다.

그리고 아무리 좌클릭을 해도 구매가 되지 않습니다.

어떻게 해야 하나요?




1개의 댓글

스크립터브혼
2020.12.22

1. 요소의 패턴을 보면 [to %player%], [to %world%]와 같이 생략가능한 데이터가 있습니다. 이벤트에서 해당 정보를 가지고 있는 경우 생략 가능합니다.

예를들어 send/massage 이펙트의 경우 send %texts% to %players%의 형태이지만

이벤트가 플레이어 정보를 가지고 있는 경우 send %texts%만 사용해도 플레이어에게 메세지를 전달합니다.

그러나  periodic 이벤트의 경우 플레이어, 월드 정보를 가지고 있지 않는 이벤트이기 때문에 직접 해당 데이터를 넘겨 주어야 합니다.


2.

send "[1] %click type% = LEFT" to console
if "%click type%" contains "LEFT":
    send "[2] %loop-index% | %{주식::목록::%loop-index%::현재갯수}% >= 1" to console
    if {주식::목록::%loop-index%::현재갯수} >= 1:
        send "[3]" to console
        if player has space for 1 of loop-value named loop-index:
            send "[4] %player' money% >= %{주식::목록::%loop-index%::매매가}*1%" to console
            if player' money >= {주식::목록::%loop-index%::매매가}*1:
                send "[5]" to console
                subtract 1 from {주식::목록::%loop-index%::현재갯수}
                subtract {주식::목록::%loop-index%::매매가}*1 from player' money
                give player 1 of loop-value named "&6%loop-index%"

위 코드와 같이 모든 조건절 앞에 비교하고자 하는 값이 올바른지, 조건문을 통과하는지 확인하세요.

뉴스 및 창작물
/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

0

/files/thumbnails/576/775/003/262x150.crop.jpg?20240426232553

아티클

이달의 블록: 단단한 진흙

학교가기싫다

2024-04-26

0

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

업데이트

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