Lacky
Пользователь
- Сообщения
- 15
Код:
on chat:
trigger:
set {_players::*} to all players
set {_voteProcent} to vote / {_players::*}'s size * 100
set {_index} to random integer between 1 and {_players::}'s size
set {_randomPlayer} to {_players::%{_index}%}'s display name
set {_boxes::} to "9901", "9902", "9903", "9904", "9905", "9906", "9907", "9908"
set {_box} to {_boxes::}.getRandom()
set {_vote} to 0
if arg 1 is "vote":
set {_vote} to {_vote} + 1
if {_voteProcent} >= 60:
wait 3 seconds
clear *
loop {_player} through {_players::}:
givebox {_player} {_box}
set {_vote} to 0
вот код но в консоли ошибка:
Код:
[18:57:14 INFO]: Line 23: (voting.sk)
[18:57:14 INFO]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section.
[18:57:14 INFO]: Line: if {_voteProcent} >= 60:
[18:57:14 INFO]:
[18:57:14 INFO]: Line 29: (voting.sk)
[18:57:14 INFO]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section.
[18:57:14 INFO]: Line: loop {_player} through {_players::}:
[18:57:14 INFO]:
[18:57:14 INFO]: Line 3: (voting.sk)
[18:57:14 INFO]: Can't understand this section: trigger
[18:57:14 INFO]: Line: trigger:
[18:57:14 INFO]:
[18:57:14 INFO]: [Skript] Encountered 1 error while reloading the config, aliases and all scripts! (2561ms)
как можно исправить? цель такая: в начале мини игры людям выдается рандомный набор из плагина RandomBox потом они могут прописать команду /vote и если больше 60% игроков голосуют то инвентари всем очищаются, наборы меняются для каждого разный команда выдачи набора /givebox ник номер (9901, 9902, 9903...).