Mirreski / Skript

Skript is a Bukkit plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
http://njol.ch/projects/skript
7 stars 2 forks source link

Variable removal [V8] #22

Closed Sopher closed 9 years ago

Sopher commented 9 years ago

If I remove the variable that is stored in the database (mysql), and then check the contents variable is the variable still has not changed its value (not removed himself), but the database has a value of "null" - http://screenshooter.net/102182620/erdlkua. Only after reloading my script variable is properly read - as deleted. Sorry for my language, but I'm from Poland XD

Mirreski commented 9 years ago

I have never used MYSQL and only stayed flatfile. I also don't have a lot of knowledge around mysql in java or overall so it will be hard for me to work on mysql related problems:/

I will take a look later and see if I can understand the problem. I am sick atm so I haven't felt like coding for a while now.

Well the value NULL is that it is empty but not deleted.

Try the below!!!

One thing you can try would be to go into your config.sk in the Skript folder and then to the database related settings and see if "monitor changes:" is set to true. Monitor changes info copied from config file:

# If 'monitor changes' is set to true, variables will repeatedly be checked for updates in the database (in intervals set in 'monitor interval').
# ! Please note that you should set 'pattern', 'monitor changes' and 'monitor interval' to the same values on all servers that access the same database!

Then it will check for changes in the database every X seconds(default might be 20 seconds) and update the database and probably delete all variables in the database that have the value of NULL.

So if 'monitor changes' is not true, set it to true and then remove a variable in the mysql database and then wait 20 (or whatever you set the monitor interval to) seconds and see if it gets deleted correctly.

Sopher commented 9 years ago

I changed it but still don't work.

Mirreski commented 9 years ago

I haven't tested this one but I will trust Pirat.

Sopher commented 9 years ago

Yeah, Pirat fixed it. I tested new version and works good :)