Hey guys!
I'm coding a simple law plugin, here's the code so far. I'm struggling a bit
Using the example,
" /createlaw Law to Increase Tax" returns a number tagged along with the law, 0, to keep track of the law. Lawtext:0 is set to the string in the command /createlaw, so Lawtext:0 should return "Law to Increase Tax". However, when I use the command /law 0 it returns <none>.
I'm not sure why this is. Thanks!
I'm coding a simple law plugin, here's the code so far. I'm struggling a bit
code_language.skript:
variables:
{var} = 0
command /createlaw [<text>]:
trigger:
argument 1 is set:
add {var} to {laws::*}
send "Your law number is %{var}%"
set {lawtext:%{var}%} to argument 1
add 1 to {var}
send "Law Created!"
command /law <text>:
trigger:
if "%{laws::*}%" contains "%argument 1%":
send "%{lawtext:argument 1}%"
" /createlaw Law to Increase Tax" returns a number tagged along with the law, 0, to keep track of the law. Lawtext:0 is set to the string in the command /createlaw, so Lawtext:0 should return "Law to Increase Tax". However, when I use the command /law 0 it returns <none>.
I'm not sure why this is. Thanks!