Hello! I'm having a problem with my skript, so basically, here's the code and the issue:
But using this was causing skript to not work, pretty sure this is because timespan and text since if I put "1 day", then the day part could be a part of timespan OR text, so skript just wasn't working. I decided to change it to something like this:
So, basically using "@" as a separator for the timespan and text. This was working fine, but then I realised the "&cUsage: /tempban <player> <timespan> <reason>" messages weren't working, but instead, I got messages like "Correct usage: /tempban [<offline player>] [<timespan>] @ [<text>]" which I didn't want. How can I make it so that I get the custom usage messages I made while having the @ separator, or is there a way I can do this command without having the @ separator and still keeping timespan and text?
Before any of you say that arg 3(text) becomes arg 4(text) due to the @ separator, it does not. I have tested this.
code_language.skript:
command /tempban [<offline player>] [<timespan>] [<text>]:
permission: command.tempban
permission message: &cYou do not have permission to perform this action.
trigger:
if arg 1 is not set:
message "&cUsage: /tempban <player> <timespan> <reason>"
if arg 1 is set:
if arg 2 is not set:
message "&cUsage: /tempban %arg 1% <timespan> <reason>"
if arg 2 is set:
if arg 3 is not set:
message "&cUsage: /tempban %arg 1% %arg 2% <reason>"
if arg 3 is set:
ban events.. etc.
But using this was causing skript to not work, pretty sure this is because timespan and text since if I put "1 day", then the day part could be a part of timespan OR text, so skript just wasn't working. I decided to change it to something like this:
code_language.skript:
command /tempban [<offline player>] [<timespan>] @ [<text>]:
So, basically using "@" as a separator for the timespan and text. This was working fine, but then I realised the "&cUsage: /tempban <player> <timespan> <reason>" messages weren't working, but instead, I got messages like "Correct usage: /tempban [<offline player>] [<timespan>] @ [<text>]" which I didn't want. How can I make it so that I get the custom usage messages I made while having the @ separator, or is there a way I can do this command without having the @ separator and still keeping timespan and text?
Before any of you say that arg 3(text) becomes arg 4(text) due to the @ separator, it does not. I have tested this.