Hi, I need help with figuring out the problem behind my small code here.
I have made a command which will give me items the way I specify them to be given (Get and Give).
The first part of the Skript works correctly, from the first "if arg-1 is ..." on until the second "if arg-1 is ...".
When I place a second if arg-1 is with different arg-2's following it, it keeps showing the output that arg-1 (second arg-1 in the skript) gives, combined with its special arg-2's.
(changing "else if arg-1" to "if arg-1" doesn't change anything.)
Any solutions?
!!!! SKRIPT:
options:
NoPerm: &4&l(&f&lUK&4&l) >> &4You do not have the needed permissions to use this command!
ConsoleMessage: &4&l(&f&lUK&4&l) >> &4You need to be in-game for this commando to work correctly!
command /TT [<text>] [<text>] [<text>]:
trigger:
if executor isn't a player:
message "{@ConsoleMessage}"
stop
if arg-1 isn't set:
if executor doesn't have permission "testperm.help":
message "{@NoPerm}"
stop
message ""
message "&4&l>------(&f&lTT&4&l)------<"
message ""
message "&7/TT &c>>&7 ... &7[&cGet&7, &cGive&7]"
message ""
message "&4&l>------(&f&lTT&4&l)------<"
message ""
stop
if arg-1 is "get":
if executor doesn't have permission "testperm.get":
message "{@NoPerm}"
stop
message ""
message "&4&l>------(&f&lTT&4&l)------<"
message ""
message "&7/TT get &c>>&7 ... &7[&cTest_Item&7, &cItem22&7]"
message ""
message "&4&l>------(&f&lTT&4&l)------<"
message ""
if arg-2 is "Test_Item":
give iron ingot named "&4&lTest-Item" with lore "&f&lThis it a Test-Item" to the player
message "&7You have recieved the powerfull &4&lTest-Item&7!"
if arg-2 is "Item2":
give gold ingot named "&4&lItem2" with lore "&f&lThis is a Item2" to the player
message "&7You have recieved &4&lItem22&7!"
else if arg-1 is "give":
message "1-give-test"
message "2-give-test"
message "3-give-test"
message "4-give-test"
message "5-give-test"
message "6-give-test"
message "7-give-test"
if arg-2 is "test1":
message "TEST1 WORKS"
if arg-2 is "test2":
message "TEST2 WORKS"
I have made a command which will give me items the way I specify them to be given (Get and Give).
The first part of the Skript works correctly, from the first "if arg-1 is ..." on until the second "if arg-1 is ...".
When I place a second if arg-1 is with different arg-2's following it, it keeps showing the output that arg-1 (second arg-1 in the skript) gives, combined with its special arg-2's.
(changing "else if arg-1" to "if arg-1" doesn't change anything.)
Any solutions?
!!!! SKRIPT:
options:
NoPerm: &4&l(&f&lUK&4&l) >> &4You do not have the needed permissions to use this command!
ConsoleMessage: &4&l(&f&lUK&4&l) >> &4You need to be in-game for this commando to work correctly!
command /TT [<text>] [<text>] [<text>]:
trigger:
if executor isn't a player:
message "{@ConsoleMessage}"
stop
if arg-1 isn't set:
if executor doesn't have permission "testperm.help":
message "{@NoPerm}"
stop
message ""
message "&4&l>------(&f&lTT&4&l)------<"
message ""
message "&7/TT &c>>&7 ... &7[&cGet&7, &cGive&7]"
message ""
message "&4&l>------(&f&lTT&4&l)------<"
message ""
stop
if arg-1 is "get":
if executor doesn't have permission "testperm.get":
message "{@NoPerm}"
stop
message ""
message "&4&l>------(&f&lTT&4&l)------<"
message ""
message "&7/TT get &c>>&7 ... &7[&cTest_Item&7, &cItem22&7]"
message ""
message "&4&l>------(&f&lTT&4&l)------<"
message ""
if arg-2 is "Test_Item":
give iron ingot named "&4&lTest-Item" with lore "&f&lThis it a Test-Item" to the player
message "&7You have recieved the powerfull &4&lTest-Item&7!"
if arg-2 is "Item2":
give gold ingot named "&4&lItem2" with lore "&f&lThis is a Item2" to the player
message "&7You have recieved &4&lItem22&7!"
else if arg-1 is "give":
message "1-give-test"
message "2-give-test"
message "3-give-test"
message "4-give-test"
message "5-give-test"
message "6-give-test"
message "7-give-test"
if arg-2 is "test1":
message "TEST1 WORKS"
if arg-2 is "test2":
message "TEST2 WORKS"