I know perl enough to do some cool things with it, but I don't understand how to interface with arma or rather I can interface with arma but I can't regex based on output from the server. I assumed that using SPAWN_SCRIPT and INTERCEPT_UNKNOWN_COMMANDS 1, I could just use something like
Only kyle or Voodoo can probably confirm this, but it is my understanding that only PHP and Python are supported in the current .2.8 branches. Only python is supporting in the trunk scripting branch Voodoo has started.
Armagetron: It's a video game that people should just play and enjoy https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
Scripts launched with SPAWN_SCRIPT are fed ladderlog as input, not the output from the server console. Take a look at var/ladderlog.txt, or run LADDERLOG_WRITE in the server console to see a little documentation about the format of events.
compguygene: any language will work. Scripts only need to read stdin and write commands to stdout.
ahh thanks dlh that makes sense as to why its not working I don't have anything writing to ladderlog ;p
EDIT: hmm well it still doesn't seem to be working I've set --vardir /h4z/.tronlogs/ so that it would output ladderlog.txt there but can't seem to get anything. ;(
I've enabled LADDERLOG_WRITE_ALL 1, with SPAWN_SCRIPT my-script.pl but arma doesn't seem to be passing ladderlog.txt to it, I've verified that my script works by running tail -f ~/.tron-logs/ladderlog.txt | /usr/share/armagetronad/scripts/my-script.pl, so it works it just appears that arma isn't passing ladderlog to it. maybe I compiled arma wrong ? I compiled with --enable-respawn --enable-armathentication --prefix=/usr/local did I miss a flag ? I'm running arma with --configdir /usr/local/etc/games/armagetronad --vardir ~/.tron-logs/ --datadir /usr/share/armagetronad/.
dlh wrote:Scripts launched with SPAWN_SCRIPT are fed ladderlog as input, not the output from the server console. Take a look at var/ladderlog.txt, or run LADDERLOG_WRITE in the server console to see a little documentation about the format of events.
compguygene: any language will work. Scripts only need to read stdin and write commands to stdout.
I must have been rather tired when I made my post. I think I was confusing the new trunk scripting branch that Voodoo has been working on with normal scripting.
Armagetron: It's a video game that people should just play and enjoy https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
anyone ^^ know what my problem is ? I've done everything that I believe is necessary to make it work, the script works fine if I cat ladderlog to it or manually so that part works, arma just isn't feeding my script ladderlog, so unless I missed a compile script or a flag I'm clueless.