Title: Skript if message starts with "!" not working. <
I have skript like:
I keep getting an error of ''if message starts with "!":"
Does someone know how to solve this?
Thanks!
(Server version 1.8)
I have skript like:
Code:
on chat:
if {kd.%player%} is "Kingdomloos":
cancel event
broadcast "&7[&fKingdomloos&7] &7%coloured player's displayname%: &7%message%"
else:
set {hash} to "##"
set {procent} to "@"
if message starts with "!":
cancel event
set {message.%player%} to "%message%"
replace all "!" with "" in {message.%player%}
broadcast "&7{&rRoleplay&7} [&f%coloured {kd.prefix.%{kd.%player%}%}%&7] &7[&f%{kd.role.%player%}%&7] &f%coloured player's prefix%&7%coloured player's displayname%: &f%{message.%player%}%"
else if message starts with "%{hash}%":
cancel event
set {message.%player%} to "%message%"
replace all "%{hash}%" with "" in {message.%player%}
broadcast "&7{&rP&7} [&f%coloured {kd.prefix.%{kd.%player%}%}%&7] &7[&f%{kd.role.%player%}%&7] &f%coloured player's prefix%&7%coloured player's displayname%: &7%{message.%player%}%"
else if message starts with "%{procent}%":
if {kd.role.%player%} is "&6Koning" or "&6Koningin" or "&6Senator" or "&6Keizer" or "&2Hertog" or "&2Hertogin" or "&2Warchief":
cancel event
set {message.%player%} to "%message%"
replace all "%{procent}%" with "" in {message.%player%}
loop all players:
if {kd.role.%loop-player%} is "&6Koning" or "&6Koningin" or "&6Senator" or "&6Keizer" or "&2Hertog" or "&2Hertogin" or "&2Warchief":
send "&7{&cHKM&7} [&f%coloured {kd.prefix.%{kd.%player%}%}%&7] &7[&f%{kd.role.%player%}%&7] &f%coloured player's prefix%&7%coloured player's displayname%: &7%{message.%player%}%" to loop-player
else:
if loop-player has permission "kd.hkm":
send "&7{&cHKM&7} [&f%coloured {kd.prefix.%{kd.%player%}%}%&7] &7[&f%{kd.role.%player%}%&7] &f%coloured player's prefix%&7%coloured player's displayname%: &7%{message.%player%}%" to loop-player
else:
if player has permission "kd.hkm":
cancel event
set {message.%player%} to "%message%"
replace all "%{procent}%" with "" in {message.%player%}
loop all players:
if {kd.role.%loop-player%} is "&6Koning" or "&6Koningin" or "&6Senator" or "&6Keizer" or "&2Hertog" or "&2Hertogin" or "&2Warchief":
send "&7{&cHKM&7} [&f%coloured {kd.prefix.%{kd.%player%}%}%&7] &7[&f%{kd.role.%player%}%&7] &f%coloured player's prefix%&7%coloured player's displayname%: &7%{message.%player%}%" to loop-player
else:
if loop-player has permission "kd.hkm":
send "&7{&cHKM&7} [&f%coloured {kd.prefix.%{kd.%player%}%}%&7] &7[&f%{kd.role.%player%}%&7] &f%coloured player's prefix%&7%coloured player's displayname%: &7%{message.%player%}%" to loop-player
else:
loop all players:
if {kd.%loop-player%} is equal to {kd.%player%}:
cancel event
send "&7[&f%coloured {kd.prefix.%{kd.%player%}%}%&7] &7[&f%{kd.role.%player%}%&7] &f%coloured player's prefix%&7%coloured player's displayname%: &7%message%" to loop-player
else:
cancel event
loop all players:
if {kd.%loop-player%} is equal to {kd.%player%}:
send "&7[&f%coloured {kd.prefix.%{kd.%player%}%}%&7] &7[&f%{kd.role.%player%}%&7] &f%coloured player's prefix%&7%coloured player's displayname%: &7%message%" to loop-player
I keep getting an error of ''if message starts with "!":"
Does someone know how to solve this?
Thanks!
(Server version 1.8)
Last edited: