rotation script

Post here if you need help setting up your server, etc.
nelg

Re: rotation script

Post by nelg »

actually if you are ganna use more than 1 fuctions, you can LADDER_LOG_WRITE_ALL 1 .

Dont run this in the server, run it from a config file:

Code: Select all

SPAWN_SCRIPT race_rotation.php
LADDER_LOG_WRITE_ALL 1
Unless you edited it, it might just rotate 1 round or never.

EDIT: it will rotate after 1 rounds instead of 3. try MATCH_WINNER ?
snake
Average Program
Posts: 59
Joined: Thu Oct 13, 2011 6:24 am

Re: rotation script

Post by snake »

I tried what nelg said: i made a new cfg file called start.cfg and i put

Code: Select all

SPAWN_SCRIPT race_rotation.php
LADDER_LOG_WRITE_ALL 1
in it.

I i included it ingame by typing

Code: Select all

/admin include start.cfg
but it gave me 2 error messages:
RA: Exterernal command 'race_rotation.cfg' not found anywhere in <datapath>/scripts/.
RA: Command LADDER_LOG_WRITE_ALL unknown.
User avatar
Z-Man
God & Project Admin
Posts: 11624
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: rotation script

Post by Z-Man »

snake wrote:RA: Exterernal command 'race_rotation.cfg' not found anywhere in <datapath>/scripts/.
Yeah, scripts started that way need to be in <system data path>/scripts (which already exists, so it should be easy to find) or <user data path>/scripts (which you'd need to create).
snake wrote:RA: Command LADDER_LOG_WRITE_ALL unknown.
Well, the whole thing hinges on running the correct version of the server that actually can write the entries the script expects into the ladderlog. You probably need a recent sty, I don't think we have them on the mainline.
Moofie
Core Dumper
Posts: 125
Joined: Fri Jan 27, 2012 1:36 am
Location: Ohio
Contact:

Re: rotation script

Post by Moofie »

Heh, actually the command is LADDERLOG_WRITE_ALL not LADDER_LOG_WRITE_ALL
User avatar
Z-Man
God & Project Admin
Posts: 11624
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: rotation script

Post by Z-Man »

Or that :)
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1897
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: rotation script

Post by kyle »

Z-Man wrote:
snake wrote:RA: Command LADDER_LOG_WRITE_ALL unknown.
Well, the whole thing hinges on running the correct version of the server that actually can write the entries the script expects into the ladderlog. You probably need a recent sty, I don't think we have them on the mainline.
What he needed was ROUND_COMMENCING for that script and based on what he said below he must have sty+ct since that is only part of sty+ct
snake wrote:I added ladderlog_write_ROUND_COMMENCING 1 in the server cfg and it loaded correctly. Only it didnt make a difference :( Im still not getting anything from the script.
really there should be no need for LADDERLOG_WRITE_ALL for a small script like this

I'd sugest changing

Code: Select all

tail -f $ladderlog | $parser | $tron --resourcedir $resourcedir --userconfigdir $userconfigdir --vardir $vardir | tee -a $log
to

Code: Select all

tail -f $ladderlog | $parser | tee -a ${cmds} | $tron --resourcedir $resourcedir --userconfigdir $userconfigdir --vardir $vardir | tee -a $log
or just runing

Code: Select all

tail -f $ladderlog | $parser
(with the proper valuse of $ladderlog and $parser) in the terminal to see if it is working

also could grep the ladderlog file for ROUND_COMMENCING to make sure it is getting written there
Image
Post Reply