Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Recieving wrong data from same database with same command between different skript versions

Open bloggy opened this issue 2 years ago • 1 comments

Skript/Server Version

1.18.2 server - skript version:

[11:35:38 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[11:35:38 INFO]: [Skript] Skript's documentation can be found here: https://skriptlang.github.io/Skript
[11:35:38 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[11:35:38 INFO]: [Skript] Server Version: git-Paper-387 (MC: 1.18.2)
[11:35:38 INFO]: [Skript] Skript Version: 2.6.3
[11:35:38 INFO]: [Skript] Installed Skript Addons: 
[11:35:38 INFO]: [Skript]  - skript-gui v1.3-beta1 (https://github.com/APickledWalrus/skript-gui)
[11:35:38 INFO]: [Skript]  - Skellett v2.0.5 (https://forums.skunity.com/resources/skellett.24/)
[11:35:38 INFO]: [Skript]  - skUtilities v0.9.2 (https://tim740.github.io/)
[11:35:38 INFO]: [Skript]  - skript-reflect v2.2.3 (https://github.com/TPGamesNL/skript-reflect)
[11:35:38 INFO]: [Skript]  - skript-db v1.3.4
[11:35:38 INFO]: [Skript]  - skRayFall v1.9.26 (https://sk.rayfall.net/)
[11:35:38 INFO]: [Skript]  - SkQuery v4.1.5
[11:35:38 INFO]: [Skript]  - SkBee v1.15.1 (https://github.com/ShaneBeee/SkBee)
[11:35:38 INFO]: [Skript]  - RandomSk v2.7.2
[11:35:38 INFO]: [Skript] Installed dependencies: 
[11:35:38 INFO]: [Skript]  - SQLibrary v7.1
[11:35:38 INFO]: [Skript]  - Vault v1.7.3-b131
[11:35:38 INFO]: [Skript]  - WorldGuard v7.0.7+216b061

1.16.5 server - skript version:


[11:50:40 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[11:50:40 INFO]: [Skript] Skript's documentation can be found here: https://skriptlang.github.io/Skript
[11:50:40 INFO]: [Skript] Server Version: git-Paper-792 (MC: 1.16.5)
[11:50:40 INFO]: [Skript] Skript Version: 2.5.3
[11:50:40 INFO]: [Skript] Installed Skript Addons:
[11:50:40 INFO]: [Skript]  - Skellett v1.9.11 (https://forums.skunity.com/resources/skellett.24/)
[11:50:40 INFO]: [Skript]  - skDragon v0.16
[11:50:40 INFO]: [Skript]  - skUtilities v0.9.2 (https://tim740.github.io/)
[11:50:40 INFO]: [Skript]  - skript-reflect v2.1.0 (https://github.com/TPGamesNL/skript-reflect)
[11:50:40 INFO]: [Skript]  - skript-db v1.2.1
[11:50:40 INFO]: [Skript]  - skRayFall v1.9.23 (https://sk.rayfall.net/)
[11:50:40 INFO]: [Skript]  - SkQuery v4.1.4
[11:50:40 INFO]: [Skript]  - SkBee v1.10.2 (https://github.com/ShaneBeee/SkBee)
[11:50:40 INFO]: [Skript]  - TuSKe v1.9.1-SZPatch (https://github.com/szumielxd/TuSKe)
[11:50:40 INFO]: [Skript]  - RandomSk v2.7.2

Bug Description

I have a 1.16.5 server with skript and sqlite database. I also have 1.18.2 server and copied over the same sqlite database from my old 1.16.5 server (double checked). I made sure that the player has joined both servers (playerdata is there on both servers).

I use the same command (which works just fine):

command /moneytest [<offlineplayer>]:
	permission: skript.perm.mod
	trigger:			
		set {_p} to arg-1
		send "Money: %{balance::%{_p}%}%" to player

The result on the 1.16.5 server with skript 2.5.3. => 200 The result on the 1.18.2 server with skript 2.6.3. => <none>

This is the same database and the same command. Both servers are part of a bungeecord network (Waterfall, Paper). I also tested some other variables (which does not involve an player) from the database and they work just fine. So it seems to be an issue related to player variables. I also tested it when the player was online. But same result (none).

Expected Behavior

The same result on both servers.

Steps to Reproduce

Store some data for offlineplayers in the sqlite database in the mentioned skript version and paper version and transfer the database over to another server and use the latest skript version and latest paper version.

Errors or Screenshots

No response

Other

No response

Agreement

  • [X] I have read the guidelines above and affirm I am following them with this report.

bloggy avatar Jul 25 '22 09:07 bloggy

Spigot generates the player UUID on each server when it's in offline mode, and since you have to set your servers to offline mode for Bungeecord, this means that you rely on Bungeecord to send the correct UUID to the server.

You need to ensure that you have online mode and ip forward true in the bungeecord configuration. Then on your spigot servers, you need to have the bungeecord option to true in the spigot.yml. This will ensure the UUID's are correct.

When Skript serializes an offlineplayer/player (they use same serializer) it will use their UUID, and in your case they seem to be different UUID's probably because you don't have your Bungeecord setup correctly.

Paper spigot automatically forces Bungeecord mode online so people can't possibly mess up installation on the server side.

If you've done this already (or upgraded to Paper at some point), it's also possible that the SQLite data is the old generated UUID and can't compare to the new actual UUID from the online mode.


I would also suggest using Skript's MySQL database rather than SQLite in your case as you have multiple servers using the same database.

If you have a cracked server and rely on having the online mode set to false, maybe you can make a new issue suggestion to have a configuration option to use names and not UUID like the old pre 2.1 Skript versions used to.

You can view more about how to setup a Bungeecord network here: https://www.spigotmc.org/wiki/bungeecord-installation/

Closing soon after potential feedback.

TheLimeGlass avatar Jul 25 '22 20:07 TheLimeGlass