Solved set SECOND element of ...

  • Welcome to skUnity!

    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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Flynn_LG

Member
Nov 4, 2019
38
1
8
26
Hey guys!

How can I set a second element of ... to an another variable?

Code:
set {_day} to second element out of {_datum::*}

Thanks!


Sry for my bad english:emoji_grin:(German)
 
I don't know how Skript does it, but {_datum::*} is supposed to be an array, so {_datum::2} or {_datum::1} should be the second element, not sure which one because in programming we start with 0 as the first position, try it out :emoji_slight_smile:
{_datum::2} would be the second element in a basic Skript list. Here is the docs for getting an element from a list:
https://skripthub.net/docs/?id=942

Example:
code_language.skript:
set {_day} to 3rd element of {_datum::*}
set {_month} to 5th element of {_datum::*}
#etc
 
Last edited:
Status
Not open for further replies.