이해도 | 초보자(스크립트 구성요소나 기본문법은 알아요) |
---|---|
게임버전 (JE) | 1.12.2 |
게임버전 (BE) | 관련없음 |
on inventory click:
if inventory name is "&d&l투표 집계 도우미":
if clicked raw slot is 9:
cancel event
add 1 to {_a}
send "&c&l??? 1표 추가" to player
send "&c&l현재 %{_a}%표" to player
if clicked raw slot is 10:
cancel event
add 1 to {_b}
send "&d&l??? 1표 추가" to player
send "&c&l현재 %{_b}%표" to player
if clicked raw slot is 11:
cancel event
add 1 to {_c}
send "&6&l??? 1표 추가" to player
send "&c&l현재 %{_c}%표" to player
if clicked raw slot is 12:
cancel event
add 1 to {_d}
send "&e&l??? 1표 추가" to player
send "&c&l현재 %{_d}%표" to player
if clicked raw slot is 14:
cancel event
add 1 to {_e}
send "&a&l??? 1표 추가" to player
send "&c&l현재 %{_e}%표" to player
if clicked raw slot is 15:
cancel event
add 1 to {_f}
send "&b&l??? 1표 추가" to player
send "&c&l현재 %{_f}%표" to player
if clicked raw slot is 16:
cancel event
add 1 to {_g}
send "&5&l??? 1표 추가" to player
send "&c&l현재 %{_g}%표" to player
if clicked raw slot is 17:
cancel event
add 1 to {_h}
send "&f&l??? 1표 추가" to player
send "&c&l현재 %{_h}%표" to player
if clicked raw slot is 22:
cancel event
set {_a} to 0
set {_b} to 0
set {_c} to 0
set {_d} to 0
set {_e} to 0
set {_f} to 0
set {_g} to 0
set {_h} to 0
send "&d&l투표 집계 설정이 초기화되었습니다." to player
if clicked raw slot is 27:
cancel event
broadcast "&c&l??? &f&l: %{_a}%표"
if clicked raw slot is 28:
cancel event
broadcast "&d&l??? &f&l: %{_b}%표"
if clicked raw slot is 29:
cancel event
broadcast "&6&l??? &f&l: %{_c}%표"
if clicked raw slot is 30:
cancel event
broadcast "&e&l??? &f&l: %{_d}%"
if clicked raw slot is 32:
cancel event
broadcast "&a&l??? &f&l: %{_e}%"
if clicked raw slot is 33:
cancel event
broadcast "&b&l??? &f&l: %{_f}%"
if clicked raw slot is 34:
cancel event
broadcast "&5&l??? &f&l: %{_g}%"
if clicked raw slot is 35:
cancel event
broadcast "&f&l??? &f&l: %{_h}%"
--------------------------------------------
저렇게 변수에 투표 수를 추가하고 아래 버튼을 눌러서 그 투표 수를 출력하려고 하는데
현재 투표 수도 계속 1이고 , broadcast로 출력을 해도 <none>이라고 뜨네요 ㅠㅠ.. 어떻게 해야하는건가요?
제가 변수활용을 잘못하고 있는거겠죠??..
거너아나
2022.03.15변수 앞에 _를 붙이면 임시 변수가 되어서 값이 저장되지 않습니다
할거면 _를 지우시면 잘 작동할겁니다
Brigettd
2022.03.15아 그렇군요 ㅠㅠㅠ 잘 작동합니다 감사합니다 새로운 것 하나 배워갑니다..!!