#skript-db dosent work and write.
1 messages · Page 1 of 1 (latest)
you should remove your username/password from the url when sending it online for your privacy
do not update the database every tick! because it’s checking the player count, only update it during a player join/leave event
make sure to verify that the details of the database connection are good
and because you’re using an sql database, consider switching to skript’s built in database available in the skript config
If you're running 2.8.0+ you gotta use execute unsafe "..." in ...
Hide your password
That's also probably a good idea
ok
FUCK
FR
yeah, duh
ye i change it to something else rn
wdym reroll
like change it*
i changed it to random stuff
i dont have ram problom btw
i need to send data from 2 servers
from the main to the que
that's fine just use the on join and on leave event to update it
i am using the newst
also this
ah okay, then you gotta use execute unsafe
it's just localhost..
ye
but not the numbers
lol
on script load:
set {-sql} to the database "mysql://localhost:3306/mydatabase?user=Fornite&password=NotThePassword&useSSL=false"
on join:
execute unsafe "INSERT INTO table (playerOnlineRP) VALUES (%number of all players%) ON DUPLICATE KEY UPDATE playerOnlineRP=VALUES(playerOnlineRP)" in {-sql}
on leave:
execute unsafe "INSERT INTO table (playerOnlineRP) VALUES (%number of all players%) ON DUPLICATE KEY UPDATE playerOnlineRP=VALUES(playerOnlineRP)" in {-sql}``` like that?
i will use every 1 tick
cus if 0 players it will not know
you shouldnt use every 1 tick for that
i dont have a problom with ever y1 tick cus it isnt loop all players or loop
i used a lot of every 1 tick
well then just continue using it
its not like i will have 400 every 1 tick

i will use on join too
what did you send
if its in white i cant see it
so i will delete this from now
bye
I sent a face palm emoji.
if it will not work i will open a new one
Lord have mercy on your eyes 😬
did you remember to change the password in your code too?
ye
on script load:
set {-sql} to the database "mysql://localhost:3306/mydatabase?user=-----&password=-----&useSSL=false"
every 1 tick:
execute unsafe "INSERT INTO table (playerOnlineRP) VALUES (%number of all players%) ON DUPLICATE KEY UPDATE playerOnlineRP=VALUES(playerOnlineRP)" in {-sql}
on join:
execute unsafe "INSERT INTO table (playerOnlineRP) VALUES (%number of all players%) ON DUPLICATE KEY UPDATE playerOnlineRP=VALUES(playerOnlineRP)" in {-sql}
on leave:
execute unsafe "INSERT INTO table (playerOnlineRP) VALUES (%number of all players%) ON DUPLICATE KEY UPDATE playerOnlineRP=VALUES(playerOnlineRP)" in {-sql}
do i need to add 3306 to the lan settings?
why do you still have the every 1 tick event
it saying it cant find mydatabase
yes, I know
do i need to change it or something
yes
wait let me try something
i am in heer
do i need to do something in heer
wait wut
you still shouldnt use the every tick event
well then, don't take my help
BRO
so who dod i detect when 0 players online
@ebon spoke
@ebon spoke
@ebon spoke
Yeah mate you're blocked