I was playing around with an idea for a script and wondered why I always had error on lines that had no code. The error was going away when I was exiting the game, but errors would persist even after I fixed them in the code.
So I tested
And, sure enough, it printed just fine when I typed any command; it echoed "Ok".
hen I modified the code and changed "ok" to anything else (i.e. "Hello world!"). When I reload the world, and typed a command, I got two output :
So, I thought, WTF? The event is not being unregistered/cleared when going back to the main menu and reloading a world?? Can it be possible that other scripts suffer from this, too? (i.e. areaprotection, worldedit, etc.) If so, no wonder the server crawls to it's knees when many users connect, get disconnected... especially admins, and commands are typed; they must be applied multiple times!
Any thoughts, precisions?