Discord Thread Functions not sending parts of list variable

  • 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!

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.

skUnity Discord

Site Manager
Aug 5, 2023
12,755
0
0
The skUnity Discord
discord.gg
code_language.skript:
command /test:
    trigger:
        set {_testing::*} to randomQuestionEasy()
    
        broadcast "{_testing::1}: %{_testing::1}%"
        broadcast "{_testing::2}: %{_testing::2}%"
        broadcast "{_testing::3}: %{_testing::3}%"
        broadcast "{_testing::4}: %{_testing::4}%"
function randomQuestionEasy() :: objects:
    set {_testTriviaQuestion::1::question} to "test"
    set {_testTriviaQuestion::1::difficulty} to 1
    set {_testTriviaQuestion::1::options::*} to "option 1", "option 2", "option 3", and "option 4"
    set {_testTriviaQuestion::1::answer} to "option 1"
    return {_testTriviaQuestion::1::*}
Why wont it return the value of
{_testTriviaQuestion::1::options::*}
?

Posted by: eatdatpizza from the skUnity Discord. View the thread on skUnity Discord here
 
the usage of
::*
will only return what is apart of that map key
so
code_language.skript:
{_testTriviaQuestion::1::question}
{_testTriviaQuestion::1::difficulty}
{_testTriviaQuestion::1::options::*}
{_testTriviaQuestion::1::answer}
{_testTriviaQuestion::1::::*} =  question, difficulty and answer + options but it's null
the settings for options is a while other map key inside options

Posted by: fusezion from the skUnity Discord.
 
Status
Not open for further replies.