Thank you for your reply, you have given me a way better explanation of what's going on in the script, than the guys at server hosting in customer service.
But the thing is I don't own this script, and I don't know a thing about Lua scripting, sooo...
I understand what you wrote, and you say the problem is in mysql?
Here's a picture of a gate in MySQL. Image
Isn't "default state" x y z as in dis and "changed state" x2 y2 z2 as in dis2?
How do I fix it?