Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
command /add <text>:
trigger:
#This adds your name to the list
add arg 2 to {Variable2::*}
#Here if the list count hasnt been set it will start at 0
if {name_count} is not set:
set {name_count} to 0
#once a note is added it adds 1 to the total note amount.
set {name_count} to {name_count} + 1
set {name_count} to {name_count} - 1
broadcast "%{name.count}%"
Although that would work you could simplyA bit confused as to what you mean, but this may help. When you set a variable like {Variable2} you can only set it to 1 thing.
You can, however, add the words to a list variable like this {Variable2::*}.
So then {Variable2::*} is the list containing Name1, name2 and name3.
To broadcast a count of the number of contents in that list you'd need to set a separate variable that represents the current number on the list. It'd look potentially like this:
You'd do the same when you remove a name only you'd take away from the total list count instead like this:code_language.skript:command /add <text>: trigger: #This adds your name to the list add arg 2 to {Variable2::*} #Here if the list count hasnt been set it will start at 0 if {name_count} is not set: set {name_count} to 0 #once a note is added it adds 1 to the total note amount. set {name_count} to {name_count} + 1
Then when you want to broadcast the total amount the list contains you only need to do something like:code_language.skript:set {name_count} to {name_count} - 1
code_language.skript:broadcast "%{name.count}%"
broadcast "%size of {Variable2::*}%"
Ooo I didn't know that was a thing! That's much easierAlthough that would work you could simply
code_language.skript:broadcast "%size of {Variable2::*}%"
set {_slot} to "%size of {_result1::*}%"
broadcast "&b%{_slot}%" #works - broadcasts 3
set slot {_slot} of {_executer}'s current inventory to book and quill named "wont work?" with lore ""
Won't work :'(
code_language.skript:set {_slot} to "%size of {_result1::*}%" broadcast "&b%{_slot}%" #works - broadcasts 3 set slot {_slot} of {_executer}'s current inventory to book and quill named "wont work?" with lore ""
{_executer} is %player%, this is in a function
using Skript Dev 25.
How do i fix this?
[doublepost=1499977729,1499976695][/doublepost]@Wynnevir
set {_slot} to "%size of {test::*}%" parsed as number
Or... just don't put it in a string in the first placeParse the variable set to the size as a number.
code_language.skript:set {_slot} to "%size of {test::*}%" parsed as number
That means don't put it in between the " " right?Or... just don't put it in a string in the first place
That and you wouldn't need the %s eitherThat means don't put it in between the " " right?