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

kittkarrkitt

Supporter
Jan 4, 2021
33
0
6
Hello. I am trying to setup a database between two servers for Skript, and I believe I have set it up correctly. However, now im testing it, it seems to not update an variable on the 2nd server, when changed on the 1st server.

I got advised to go and check if the tables in the database were actually getting updated using MySQLWorkbench.

Its sending
unknown.png
while in the 2nd server, while the same variable is "1" in the 1st server.


1st server code:
Code:
command /data2b:
    trigger:
        broadcast "%{presta_perm1::%player%}%"
        stop

command /doit:
    trigger:
        broadcast "%{presta_perm1::%player%}%"
        wait 2 seconds
        message "Doit executed"
        if {presta_perm1::%player%} isn't set:
            set {presta_perm1::%player%} to 0
            message "&4TURNED OFF"
            stop
        if {presta_perm1::%player%} is 1:
            set {presta_perm1::%player%} to 0
            message "&4TURNED OFF"
            stop
        if {presta_perm1::%player%} is 0:
            set {presta_perm1::%player%} to 1
            message "&2TURNED ON"
            stop
2nd server code:
Code:
command /data2b:
    trigger:
        broadcast "%{presta_perm1::%player%}%"
        stop
database info in "config.sk" on both servers in both configs after restarts:
Code:
datatest:
    type: MySQL
    pattern: presta_.*
    host: ***.**.***.***
    port: 3307
    user: USERNAME
    password: **********
    database: presta-database
    table: variables21
    #
    monitor changes: true
    monitor interval: 20 seconds
(Some of the code is blurred out for security reasons)

While looking in MySQLWorkbench, it seems like there is nothing being stored in the database.
upload_2021-4-12_15-23-40.png


The main questions here are:

- Is the database actually empty?
- How can I force something to be stored in there IF it is empty and how would I check it worked?
- Is there anything wrong in the configuration of my database/config.sk file?
- If Skript cant store data in the database, how can I make it do it?
- What should be in the database if it DID store the variable from the codes above?

Kind Regards to any readers or helpers.

[doublepost=1618498202,1618234169][/doublepost]Still need help with this
 
Status
Not open for further replies.