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
while in the 2nd server, while the same variable is "1" in the 1st server.
1st server code:
2nd server code:
database info in "config.sk" on both servers in both configs after restarts:
(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.
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
I got advised to go and check if the tables in the database were actually getting updated using MySQLWorkbench.
Its sending
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
Code:
command /data2b:
trigger:
broadcast "%{presta_perm1::%player%}%"
stop
Code:
datatest:
type: MySQL
pattern: presta_.*
host: ***.**.***.***
port: 3307
user: USERNAME
password: **********
database: presta-database
table: variables21
#
monitor changes: true
monitor interval: 20 seconds
While looking in MySQLWorkbench, it seems like there is nothing being stored in the database.
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