개인 자료란 (JE)

  서버 커뮤니티

Profile Ru_Nan 대표칭호 없음

Ru_Nan 642a599e50ad442cab0e91c0d4d2252a

Profile

질문하기 스크립트

구문 오류

2020.12.22 조회 수 570 추천 수 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/712/796/003/262x150.crop.jpg?20240525085438

레드스톤

마인크래프트 노트블록으로 만든 『 봄을 고하다 (春を告げる) 』

Sonttukk

2024-05-25

0

/files/thumbnails/268/789/003/262x150.crop.jpg?20240515192032

레드스톤

벌레먹은 돌 빠르게 제거하는 법

GlassesFilm

2024-05-15

0

/files/thumbnails/797/788/003/262x150.crop.jpg?20240515090924

건축

마인크래프트로 구현한 카르카손 보드게임

Warak

2024-05-15

1

/files/thumbnails/487/784/003/262x150.crop.jpg?20240508233607

모드

Windows Borderless 모드에서 악성코드 발견 3

학교가기싫다

2024-05-08

1

/files/thumbnails/384/778/003/262x150.crop.jpg?20240512002324

업데이트

마인크래프트 자바 에디션 스냅샷 24w18a

학교가기싫다

2024-05-06

0