Tremulous Forum

Community => Servers => Topic started by: Drewu on December 03, 2007, 06:15:59 pm

Title: Help with maprotation scripting. Error?
Post by: Drewu on December 03, 2007, 06:15:59 pm
I'm having some trouble getting this maprotation.cfg file that I wrote to work:
Code: [Select]
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?
Title: Re: Help with maprotation scripting. Error?
Post by: Undeference on December 03, 2007, 09:51:09 pm
Try removing the braces from the conditional branches.
Title: Re: Help with maprotation scripting. Error?
Post by: 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.
Title: Re: Help with maprotation scripting. Error?
Post by: Drewu on December 04, 2007, 09:34:08 am
Try removing the braces from the conditional branches.

No difference :/ Thanks for the help

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?
Title: Re: Help with maprotation scripting. Error?
Post by: Undeference on December 04, 2007, 11:43:33 pm
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.
Title: Re: Help with maprotation scripting. Error?
Post by: Drewu on December 05, 2007, 11:04:03 am
Ahh ha! Thankyou!
Just to be clear then this is the new, bug free version:
Code: [Select]
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
}