개인 자료란 (JE)

  서버 커뮤니티

Profile 준식이네김치찌개 대표칭호 없음
Profile

질문하기 스크립트

스크립트 계산 오류?

2021.01.18 조회 수 70 추천 수 0
이해도 1.16 
게임버전 (JE) 스피곳 
게임버전 (BE) SkBee, Skellett, skRayFall, SkQuery 
스크립트 버전 입문자(아무것도 몰라요) 
스크립트 애드온 2.5.3 

every 1 ticks:

    loop all players:

        set {helmet.%loop-player%} to 0

        set {chestplate.%loop-player%} to 0

        set {leggings.%loop-player%} to 0

        set {boots.%loop-player%} to 0

        set {item.%loop-player%} to 0

        set {HP.%loop-player%} to 0

        set {_lore1::*} to uncolored lore of helmet of loop-player

        set {_lore2::*} to uncolored lore of chestplate of loop-player

        set {_lore3::*} to uncolored lore of leggings of loop-player

        set {_lore4::*} to uncolored lore of boots of loop-player

        set {_lore5::*} to uncolored lore of held item of loop-player

        replace all " " and "-" and "★" and "강화됨" with "" in {_lore1::1}

        replace all " " and "-" and "★" and "강화됨" with "" in {_lore2::1}

        replace all " " and "-" and "★" and "강화됨" with "" in {_lore3::1}

        replace all " " and "-" and "★" and "강화됨" with "" in {_lore4::1}

        replace all " " and "-" and "★" and "강화됨" with "" in {_lore5::1}

        set {helmet.%loop-player%} to {_lore1::1}

        set {chestplate.%loop-player%} to {_lore2::1}

        set {leggings.%loop-player%} to {_lore3::1}

        set {boots.%loop-player%} to {_lore4::1}

        set {item.%loop-player%} to {_lore5::1}

        set {HP.%loop-player%} to 10+{chestplate.%loop-player%}*2

        set loop-player's max health to {HP.%loop-player%}

우선 문제가 있다고 생각하는부분 코드 올립니다


        set {HP.%loop-player%} to 10+{chestplate.%loop-player%}*2

이부분에서 10+{chestplate.%loop-player%}*2 를 계산하지 못하고 자꾸 10으로 반환하네요

어디가 잘못된걸까요 ㅜㅜ

2개의 댓글

스크립터브혼
2021.01.19

> set {chestplate.%loop-player%} to {_lore2::1}

여기서 저장된 값이 글자여서 계산할 수 없는 거에요.

[Parse]를 사용해서 숫자로 바꾸세요.

> %text% parsed as (integer|number)

@스크립터브혼

감사합니다! 덕분에 해결했습니다

뉴스 및 창작물
/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 모드에서 악성코드 발견 2

학교가기싫다

2024-05-08

1

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

업데이트

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

학교가기싫다

2024-05-06

0

/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

1