I'm having some trouble getting this maprotation.cfg file that I wrote to work:
rotation1
{
tremor
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients > 6
{goto rotation2}
DSArena
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients > 6
{goto rotation2}
UTCSb2
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients > 6
{goto rotation2}
paint_v2
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients > 6
{goto rotation2}
dunjeon
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients > 6
{goto rotation2}
}
rotation2
{
arachnid2
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients < 7
{goto rotation1}
niveus
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients < 7
{goto rotation1}
karith
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients < 7
{goto rotation1}
}
The basic idea I'm going for is to direct what maps get played based on player count, smaller maps for fewer players. I keep getting this error about being unable to sparse the file or that it can't go to rotation2 because it's not a map even when the server's empty!
Ideas? Thoughts? Quips?
Try removing the braces from the conditional branches.
why move up from 6 to 7? why not 6 to 10?
That just does not make sense.
Quote from: Undeference on December 03, 2007, 09:51:09 PM
Try removing the braces from the conditional branches.
No difference :/ Thanks for the help
Quote from: Oblivion on December 04, 2007, 03:38:40 AM
why move up from 6 to 7? why not 6 to 10?
That just does not make sense.
Er maybe I don't make it clear what I'm doing :P. What I am trying to do is make it so that if there are fewer than 7 players then rotation1 continues to play, but if the player count exceeds 6 then the bigger maps should be played. Like so:
1
2
3
4 Small maps
5
6
----- cut off point
7
8
9 Big maps
10
~
Am I making better sense?
Quote from: Drewu on December 04, 2007, 09:34:08 AM
No difference :/ Thanks for the help
Try removing the braces
and the "goto"s from the conditionals (which have to be
destinations -- maps or rotations). That should work.
Ahh ha! Thankyou!
Just to be clear then this is the new, bug free version:
rotation1
{
tremor
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients > 6
rotation2
DSArena
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients > 6
rotation2
UTCSb2
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients > 6
rotation2
paint_v2
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients > 6
rotation2
dunjeon
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients > 6
rotation2
}
rotation2
{
arachnid2
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients < 7
rotation1
niveus
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients < 7
rotation1
karith
{
set g_suddenDeathTime 30
set timelimit 45
}
if numClients < 7
rotation1
}