Author Topic: Help with maprotation scripting. Error?  (Read 4029 times)

Drewu

  • Posts: 12
  • Turrets: +0/-0
Help with maprotation scripting. Error?
« 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?
To whom much is given, much is required.-

Undeference

  • Tremulous Developers
  • *
  • Posts: 1254
  • Turrets: +122/-45
Re: Help with maprotation scripting. Error?
« Reply #1 on: December 03, 2007, 09:51:09 pm »
Try removing the braces from the conditional branches.
Need help? Ask intelligently. Please share solutions you find.

Thats what we need, helpful players, not more powerful admins.

Oblivion

  • Posts: 410
  • Turrets: +27/-22
    • Gamez-Host.com
Re: Help with maprotation scripting. Error?
« Reply #2 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.
World Wide Server Host

Drewu

  • Posts: 12
  • Turrets: +0/-0
Re: Help with maprotation scripting. Error?
« Reply #3 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?
To whom much is given, much is required.-

Undeference

  • Tremulous Developers
  • *
  • Posts: 1254
  • Turrets: +122/-45
Re: Help with maprotation scripting. Error?
« Reply #4 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.
Need help? Ask intelligently. Please share solutions you find.

Thats what we need, helpful players, not more powerful admins.

Drewu

  • Posts: 12
  • Turrets: +0/-0
Re: Help with maprotation scripting. Error?
« Reply #5 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
}
To whom much is given, much is required.-