이해도 | 초보자 |
---|---|
게임버전 (JE) | 1.20.1 |
게임버전 (BE) | 관련없음 |
스크립트 버전 | 2.9.2 |
on inventory click:
if name of current inventory is "&b상점_식료품":
cancel event
if clicked item is not air:
set {_lore} to uncolored line 1 of lore of clicked item
replace all "판매 가격: " and "미르" with "" in {_lore}
set {_lore} to {_lore} parsed as integer
if {%player.돈} is smaller than {_lore}:
message "&c돈이 부족해 해당 아이템을 구매할 수 없습니다."
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
else:
set {_item} to clicked item
delete lore of {_item}
give {_item} to player
subtract {_lore} from {%player%.돈}
play sound "UI_BUTTON_CLICK" with volume 0.5 to the player
여기서 if clicked item is not air: 구문이 오류가 납니다.
어떡하죠..?
windy_wind
2024.09.29if event-slot is not air: