Issues with MongoSK

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

    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.

P e t e

Member
May 29, 2021
2
0
1
Hello forums!
I'm a little stumped at the moment with a skript I am making. I am trying to use MongoSK for data storage on my server, but I am having issues getting MongoSK to cooperate with me. Could someone figure out what I am doing wrong, and/or a fix for this?


The following is a snippet of my test skript. This snippet is run within a command trigger.
Code:
# Assume {-mongo::players} is a collection with documents. One document has the field {"id":2}
# I am trying to retrieve the field "name" from the document where id=2, and message it (to the player within a command)

set {_query} to new mongo query
set mongo collection of {_query} to {-mongo::players}
set {_myfilter} to new mongosk filter where field "id" is 2
set mongo filter of {_query} to {_myfilter}
set {_doc} to first mongo document of query {_query}
message "%value ""name"" of {_doc}%"

I am using Skript and MongoSK in a free minehut server.

The following is the error I recieve upon reloading.
image.png.fb298975a73a7c23d37f3519e838917b.png


Any help would be much appreciated.

Best regards,
Coder99513
 
Status
Not open for further replies.