I've provided a major update to EventScripts. This was a great deal of work.
Please read this entire message before upgrading.
The release contains the following new commands coded primarily by Cr3V3TT3. For examples, see the updated documentation at the top of this thread.
- es_token <variable> <string> <token#> [seperator-character]
Sets a variable to the part of the string corresponding with "token#". It splits up the string according to the seperator character which defaults to space. EventScripts will expand any variables it finds. (Equivalent to running "es es_xtoken".)
es_xtoken <variable> <string> <token#> [seperator-character]
Sets a variable to the part of the string corresponding with "token#". It splits up the string according to the seperator character which defaults to space. No variables are expanded as it is assumed everything is already perfect.
In addition, this release should resolve the command execution order problem. This comes after about 7 discarded attempts to handle the issue and I've finally found a fix that works on Win32 and Linux (no thanks to Valve, though).
Important Note: The 'fix' for this problem required a major change to the way EventScripts works under the covers. It is now a little more fragile when it comes to Valve updates and there's a possibility it doesn't work wonderfully on some flavors of Linux. I've tested on Slackware 10, Windows XP, and Windows 2k3.
If EventScripts v0.7.0 doesn't work for you please
post a message ASAP indicating the problem. The good news is that if your server comes up, it's probably going to work 100% of the time.
There's a chance that if your scripts were taking advantage of the bad command ordering in the old ES, they'll behave a little oddly now. Your scripts were likely wrong before to make up for ES's shortcomings. If you have problems getting your old script adapted to v0.7.0, post them in the forums and I'll work with you to fix them.
If you run into problems, set the
eventscripts_sigscan server variable to 0 (via your srcds command-line or autoexec.cfg file) and you should revert back to how the old ES behaved-- I don't recommend this unless you're seeing major problems. If it makes you feel better, backup your old EventScripts version just in case.
For those interested, here's the well-ordered output from my ordering tests which failed so badly before v0.7.0:
Quote:
L 04/13/2005 - 00:06:40: test1
L 04/13/2005 - 00:06:40: test2
L 04/13/2005 - 00:06:40: test3
L 04/13/2005 - 00:06:40: test4
L 04/13/2005 - 00:06:40: test5
L 04/13/2005 - 00:06:40: test6
L 04/13/2005 - 00:06:40: test7
L 04/13/2005 - 00:06:40: test8
L 04/13/2005 - 00:06:40: test9
L 04/13/2005 - 00:06:40: test10
L 04/13/2005 - 00:06:40: test11
L 04/13/2005 - 00:06:40: test12
L 04/13/2005 - 00:06:40: test13
L 04/13/2005 - 00:06:40: test14
L 04/13/2005 - 00:06:40: test15
L 04/13/2005 - 00:06:40: test16
L 04/13/2005 - 00:06:40: test17
L 04/13/2005 - 00:06:40: test18
L 04/13/2005 - 00:06:40: test19
L 04/13/2005 - 00:06:40: test20
L 04/13/2005 - 00:06:40: test21
L 04/13/2005 - 00:06:40: test22
L 04/13/2005 - 00:06:40: test23
L 04/13/2005 - 00:06:40: test24
L 04/13/2005 - 00:06:40: test25
L 04/13/2005 - 00:06:40: test25
L 04/13/2005 - 00:06:40: test26
L 04/13/2005 - 00:06:40: test27
L 04/13/2005 - 00:06:40: test28
L 04/13/2005 - 00:06:40: test29
|
Thanks, and speak up if you have problems,
-Mattie