#Skript can't understand a single line of this code

1 messages · Page 1 of 1 (latest)

opal vineBOT
#

It is recommended that you don't use AI agents for multiple reasons:


2) Blindly trusting code from any source is a bad idea, especially on production servers. Even if the code that was generated appears to work, you have no clue what vulnerabilities it introduces or fails to protect against.

3) Using AI to write your code takes away from your learning and doesn't challenge you to develop problem solving skills.```
While AI can be used as a tool, it is necessary to understand what it is doing and check any code it creates. Since this is a learning community, we want to support your personal growth. As a result, we don't allow generated content in our help channels ([Rule 8](<#welcome-to-skunity message>))
faint talon
#

you're using ai generated code
read the message

hushed lance
#

ah

#

i couldnt find list documentation anywhere so uh

hushed lance
faint talon
#

just google "skript lists"
this is the first result for me https://skripthub.net/tutorials/43

opal vineBOT
#

AmazinAxel suggests that you read this embed

List Variables
Why?

List variables are a much cleaner way of storing multiple values, especially objects that are unique to something (the money of a player, the warps of the server), as they can be looped, added to, removed from, accessed, and deleted all at once, making variable organization a breeze. A list basically maps objects to their corresponding unique indices.

How to create a list variable?

To make a list, we simply use the list variable separator :: in the variable's name: {money::%uuid of player%}, {warps::%{_warpName}%}, {luckyNumbers::*}.
For example:

set {_list::*} to 1, 2, 3, and 4
set {list::%uuid of player%} to player```
Indices and values

As already mentioned, lists have indices and values. For instance, in set {money::%uuid of player%} to 100 the index is the uuid of the player and the value is 100. We can also access all the values at once by using ::*. This last part means we can replace a lot of common loops with simple lists, like send "You're on team red!" to {team-red::*} instead of looping through all players and checking if each one is on team red.

Common situations which can use lists instead
{%player%.money} -> {money::%player's uuid%}
{home.warps.%player%} -> {warps::%player's uuid%::home}
{%player%.cooldown} -> {cooldown::%player's uuid%}```
faint talon
#

there's also a gitbook on it i can pull up

hushed lance
#

......
who's idea was it to require the word and

hushed lance
faint talon
#

it doesnt

hushed lance
#

ok thanks

hushed lance
faint talon
#

for what
code cant be ran without being in an event

hushed lance
#

i see

hushed lance
faint talon
#

send full code
are you putting it into an on script load event

faint talon
#

that's probably why

west orchid
#

Oh thank you discord for not showing me the rest of the thread