Resource icon

Addon skript-db 0.2.0

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

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.
 
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.
This is an issue with Skript itself. A workaround for this may be added in the future.
 
this addon does not seem to work properly with skript 2.3.7, worked properly with 2.2 dev36, could you please fix it?
(putting data in a database/getting data does not work)

EDIT: seems to be issue with functions, gonna fix it myself
 
Last edited:
Is there any way to check if the database is working? Because if it does not, the code does not continue/delay to "continue".
 
ths addon stopped loading due to unknown reason, it used to work before, I didn't change skript version or anything.. just throws this error now:
Code:
[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
the plugin still works in my other server in the same network.. so it's really weird
EDIT: I noticed that the other server uses 0.1.1, so I guess I'm downgrading for now
 
Last edited:
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
 
Can you make it work with last version of skript please? :emoji_slight_smile: 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

it is working with Skript 2.4 so far, probably with 2.5 too. (skript addons do not depend on minecraft versions if they do not interact with Minecraft-related stuff, such as entities, blocks, items, so it doesn't matter if you're running 1.13 or something)
 
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.
 
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.
I do not run into issues like that, can you show your code?