Hi. Why this SKRIPT isn't working??
And, console error on reload
What isn't work: It's working just /sc command. /uc rl, /uc help etc don't work!
Code:
# #############################################
# UltimateChat by imHFC #
# Version 0.0.1 #
# #############################################
# #
#
#
#
#
#
#
#
#
#
#
#
#
#
#
options:
#=====================================================================================
#SETTINGS
PrefixStaffChat: &b&l[&e&lStaffChat&b&l]
Prefix: &b&l[&e&lUltimate&c&lChat&b&l]
PlayerColor: &b
MessagesColor: &c
Placeholder: &7>
#=====================================================================================
#=====================================================================================
#MESSAGES
NoPerm: &cYou have no permissions&7!
StaffChatEnabled: &6&lStaffChat &b&lENABLED!
StaffChatDisabled: &6&lStaffChat &c&lDISABLED!
UnknownCMD: &aUnknown Command&7.
Usage1: &cCorrect usage: /uc rl
#=====================================================================================
#=====================================================================================
#Command
command /staffchat [<text>]:
aliases: /sc, /ac, /adminc, /staffc
trigger:
if player has permissions "ultimatechat.staffchat":
if text arg is not set:
if {staffchat.%player%} is not set:
set {staffchat.%player%} to true
set action bar of player to "{@StaffChatEnabled}"
else:
delete {staffchat.%player%}
set action bar of player to "{@StaffChatDisabled}"
else:
message "{@Prefix} {@NoPerm}" to player
command /ultimatechat <text>:
permission: global.mute
permission message: &cYou dont have permission for this command!
aliases: /uc, /uchat, /ultimatec
trigger:
if arg is set:
if text arg is "help":
message "{@Prefix} &e-*-*-*-*-&6COMMANDS AND HELP&e-*-*-*-*-" to player
message "{@Prefix} &c- &e/gchat mute &6(Disable chat)" to player
message "{@Prefix} &c- &e/gchat unmute &6(Enable chat)" to player
message "{@Prefix} &c- &e/globalchat help &6(Commands and help)" to player
message "{@Prefix} &e-*-*-*-*-*-*--*-*-*-*-*-*--*-*-*-*-*-" to player
if text arg is "rl" or "reload":
execute console command "sk reload %script%"
wait 0.1 second
message "{@Prefix} Skript Reloaded" to player
stop
if text arg is not "rl" or "relaod" or "help":
message "{@Prefix} {@UnknownCMD}"
#=====================================================================================
#=====================================================================================
command /chatmute <text>:
permission: global.mute
permission message: &cYou have no permissions&7!
aliases: /cm, /chatm, /cmute
trigger:
if arg-1 is set:
if arg-1 is "on" or "enable" or "unmute":
set {globalmute} to true
broadcast "{@Prefix} &aChat has been enabled!"
if arg-1 is "off" or "disable" or "mute":
set {globalmute} to false
broadcast "{@Prefix} &eChat has been disabled!"
on chat:
if {globalmute} is true:
else if {globalmute} is false:
cancel event
command /clearchat:
permission: ultimatechat.clearchat
permission message: &cYou have no permissions&7!
aliases: /chatclear, /gchatclear, /globalchatclear, /gss
trigger:
loop 150 times:
broadcast ""
broadcast "{@Prefix} &aChat cleared!"
command /globalchatalert [<text>]:
permission: sb.perm
permission message: &cYou have no permissions&7!
aliases: /sb, /alert, gchatalert
trigger:
if arg 1 is set:
loop all players:
if loop-player has permission "Xoro.mod":
message "{@Prefix} &f%colored arg 1%" to loop-players
#=====================================================================================
#=====================================================================================
#Events -Start
on chat:
if {staffchat.%player%} is true:
cancel event
loop all players:
if loop-player has permissions "staffchat.use":
message "{@PrefixStaffChat} {@PlayerColor}%player% {@Placeholder} {@MessagesColor}%message%" to loop-players
message "{@PrefixStaffChat} {@PlayerColor}%player% {@Placeholder} {@MessagesColor}%message%" to console
else:
stop
else:
stop
on quit:
delete {staffchat.%player%}
#=====================================================================================
#=====================================================================================
#Small advertising -Start
on script load:
message "opened" to the console
#=====================================================================================
And, console error on reload
Code:
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 1 tab (StaffChat v1.3.sk, line 86: aliases: /uc, /uchat, /ultimatec')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 1 tab (StaffChat v1.3.sk, line 87: trigger:')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 2 tabs (StaffChat v1.3.sk, line 88: if arg is set:')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 3 tabs (StaffChat v1.3.sk, line 90: if text arg is "help":')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 16 spaces (StaffChat v1.3.sk, line 91: message "{@Prefix} &e-*-*-*-*-&6COMMANDS AND HELP&e-*-*-*-*-" to player')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 16 spaces (StaffChat v1.3.sk, line 92: message "{@Prefix} &c- &e/gchat mute &6(Disable chat)" to player')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 16 spaces (StaffChat v1.3.sk, line 93: message "{@Prefix} &c- &e/gchat unmute &6(Enable chat)" to player')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 16 spaces (StaffChat v1.3.sk, line 94: message "{@Prefix} &c- &e/globalchat help &6(Commands and help)" to player')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 16 spaces (StaffChat v1.3.sk, line 95: message "{@Prefix} &e-*-*-*-*-*-*--*-*-*-*-*-*--*-*-*-*-*-" to player')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 3 tabs (StaffChat v1.3.sk, line 98: if text arg is "rl" or "reload":')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 4 tabs (StaffChat v1.3.sk, line 99: execute console command "sk reload %script%"')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 4 tabs (StaffChat v1.3.sk, line 100: wait 0.1 second')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 4 tabs (StaffChat v1.3.sk, line 101: message "{@Prefix} Skript Reloaded" to player')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 3 tabs (StaffChat v1.3.sk, line 103: stop')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 3 tabs (StaffChat v1.3.sk, line 105: if text arg is not "rl" or "relaod" or "help":')
[05:32:44 ERROR]: indentation error: expected 4 spaces, but found 4 tabs (StaffChat v1.3.sk, line 106: message "{@Prefix} {@UnknownCMD}"')
[05:32:44 WARN]: 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. (StaffChat v1.3.sk, line 146: if {globalmute} is true:')
[05:32:45 ERROR]: Required entry 'trigger' is missing in 'command /ultimatechat <text>' (StaffChat v1.3.sk, starting at line 83) (StaffChat v1.3.sk, line 85: permission message: &cYou dont have permission for this command!')
[05:32:45 INFO]: >> StaffChat v1.3 by DampfWaffel.
[05:32:45 INFO]: Loaded 1 script with a total of 4 triggers and 4 commands in 0.32 seconds
[05:32:45 INFO]: [Skript] Encountered 17 errors while reloading all scripts!
What isn't work: It's working just /sc command. /uc rl, /uc help etc don't work!
Last edited: