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!
command /test:
trigger:
join(player)
function join(p: player):
broadcast "%{_p}%"
set {_uuid} to {_p}'s UUID
execute "SELECT id FROM Players WHERE uuid = %{_uuid}%" in {sql} and store the result in {_players::*}
broadcast last sql error
broadcast "%{_p}%"
This is an issue with Skript itself. A workaround for this may be added in the future.All my local variables are deleted when I execute a query.
Code:command /test: trigger: join(player) function join(p: player): broadcast "%{_p}%" set {_uuid} to {_p}'s UUID execute "SELECT id FROM Players WHERE uuid = %{_uuid}%" in {sql} and store the result in {_players::*} broadcast last sql error broadcast "%{_p}%"
The first broadcast shows the username, the second shows nothing since it's an empty string because there is no errors and the last shows <none>
When I try to execute this query in unsafe mode, the {_uuid} variable has already been deleted before the execution of the query which results in a syntax error near '<none>'.
It's not the first time I get this type of problem with Skript-db.
- Add option for synchronous execution on other threads
- Add some warnings for misusing SQL injection protection
- Add connection lifespan option
[skript-db] Enabling skript-db v0.2.0 Error occurred while enabling skript-db v0.2.0 (Is it up to date?) java.lang.NoClassDefFoundError: com/zaxxer/hikari/HikariDataSource at com.btk5h.skriptdb.skript.ExprDataSource.<clinit>(ExprDataSource.java:33) ~[?:?] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_211] at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_211] at ch.njol.skript.SkriptAddon.loadClasses(SkriptAddon.java:108) ~[?:?] at com.btk5h.skriptdb.SkriptDB.onEnable(SkriptDB.java:66) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.12.2.jar:git-Paper-1618] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316) ~[patched_1.12.2.jar:git-Paper-1618] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) ~[patched_1.12.2.jar:git-Paper-1618] at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:395) ~[patched_1.12.2.jar:git-Paper-1618] at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:344) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:442) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:403) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:341) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:289) ~[patched_1.12.2.jar:git-Paper-1618] at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616) ~[patched_1.12.2.jar:git-Paper-1618] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]
Caused by: java.lang.ClassNotFoundException: com.zaxxer.hikari.HikariDataSource
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_211]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:156) ~[patched_1.12.2.jar:git-Paper-1618]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:104) ~[patched_1.12.2.jar:git-Paper-1618]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_211]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_211]
... 16 more
[skript-db] Disabling skript-db v0.2.0
Can you make it work with last version of skript please? Would be very glad, maybe donate to you <3
Could you please add skript 2.4 support? I would be very glad ^^
Question, when is there going to be an 1.13 or above update of this plugin?
Its very usefull and use it allot but kind a hope for an update soon
I do not run into issues like that, can you show your code?It works, but it's buggy. For example strange things happen when you check for an existing entry in a mysql table. That entry exists but skript-db thinks that it doesn't exist and adds another entry. This happens only sometimes and I can not reproduce it, but it's happening (maybe cause of TPS drops or lags in that moment) and this makes the addon useless atm, unless somebody will fix this.