if , else if , else .. in rotation.txt ..need help

20 replies [Last post]
)[///DI50|¯)ER▄_
Offline
Joined: Jan 2011
Posts:

I need help get my rotation to see what config is currently running and execute commands based on it. My current code just seems to run the first statement even though the config isn't running.
Thanks for any help.
Here is the code. -dis

if ( $xp_config == "dc01.cfg" ) {
	if ( $xp_config == "fn1.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*CA*FTAG*"
		g_gametype: 8
		q3dm6
	} else if ( $xp_config == "fn2.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*VANILLA*TDM*"
		g_gametype: 3
		pro-q3dm6
	} else if ( $xp_config == "fn3.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*INSTAGIB*FTAG*"
		g_gametype: 8
		q3dm6
	} else if ( $xp_config == "fn4.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*INSTAGIB*CTF*"
		g_gametype: 5
		q3ctf1
	} else {
		sv_hostname: "*error*"
		q3dm0
	}
} else

^t
smasherchif's picture
Offline
Joined: Oct 2009
Posts:
Re: if , else if , else .. in rotation.txt ..need help

man, will you please re-format it, so it would be as much readable as possible.

btw, i like it:
else { sv_hostname: "*error*" q3dm0 }

Big grin

edit: it seems there's not enough closing curly brackets Winking check it
edit2: and plz, remove those lines
edit3: damn, brackets are fine, sry

here's formatting:

if ( $xp_config == "check.cfg" )
{
    if ( $xp_config == "sample1.cfg" )
    { //keeps just stopping here, even though check.cfg isn't running.
        g_gametype: 8
        q3dm6
    }
    else if ($xp_config == "sample2.cfg")
    {
        g_gametype: 3
        pro-q3dm6
    }
    else
    {
        sv_hostname: "*error*"
        q3dm0
    }
}
else
{
    q3dm1
}


.aNk/xXxp4l/:bR.Shady'XYN! wrote:
Fuck! I just thought of the most awesome pun about the BC vs Smurfs final game and the flames that followed :
"In Soviet Moldavia, Pole rages YOU"
like 2 months after Call me

3M'darkangel wrote:
// 09:30:49 27.06.2010, UNKNOWN LOCATION,
Name { "Biotoxin" }
IP { "localhost" }

SHUDDER wrote:
People are training hard to hide their autoshoot so well while gain enough skills to win (or at least compete on similar level) without them. This is getting insane or provoked. I feel like I would cut myself with Ockham's Razor if I claim a cheat there.

)[///DI50|¯)ER▄_
Offline
Joined: Jan 2011
Posts:
Re: if , else if , else .. in rotation.txt ..need help

well fixed a bit.. best i can do without the line breaks.. or this weird bbcode formatting

^t
smasherchif's picture
Offline
Joined: Oct 2009
Posts:
Re: if , else if , else .. in rotation.txt ..need help

maybe only one if-else level allowed in rotation?


.aNk/xXxp4l/:bR.Shady'XYN! wrote:
Fuck! I just thought of the most awesome pun about the BC vs Smurfs final game and the flames that followed :
"In Soviet Moldavia, Pole rages YOU"
like 2 months after Call me

3M'darkangel wrote:
// 09:30:49 27.06.2010, UNKNOWN LOCATION,
Name { "Biotoxin" }
IP { "localhost" }

SHUDDER wrote:
People are training hard to hide their autoshoot so well while gain enough skills to win (or at least compete on similar level) without them. This is getting insane or provoked. I feel like I would cut myself with Ockham's Razor if I claim a cheat there.

BOZO
Bozo's picture
Offline
Joined: Feb 2010
Posts:
Re: if , else if , else .. in rotation.txt ..need help

It's completely useless to test $xp_config inside the first block because you already know that $xp_config == "check.cfg" is true.

I think you need to do it like this:

if ( $xp_config == "check.cfg" )
{
    sv_hostname: "*error*"
    q3dm0
}
else if ( $xp_config == "sample1.cfg" )
{ //keeps just stopping here, even though check.cfg isn't running.
    g_gametype: 8
    q3dm6
}
else if ($xp_config == "sample2.cfg")
{
    g_gametype: 3
    pro-q3dm6
}
else
{
    q3dm1
}

Not sure whether this is what you were looking for.

^t
smasherchif's picture
Offline
Joined: Oct 2009
Posts:
Re: if , else if , else .. in rotation.txt ..need help

it's obvious logical mistake, bozo. was just about to write about it. but that's not the point, the point is that he claims the flow stops where 'sample1' condition is met o_O


.aNk/xXxp4l/:bR.Shady'XYN! wrote:
Fuck! I just thought of the most awesome pun about the BC vs Smurfs final game and the flames that followed :
"In Soviet Moldavia, Pole rages YOU"
like 2 months after Call me

3M'darkangel wrote:
// 09:30:49 27.06.2010, UNKNOWN LOCATION,
Name { "Biotoxin" }
IP { "localhost" }

SHUDDER wrote:
People are training hard to hide their autoshoot so well while gain enough skills to win (or at least compete on similar level) without them. This is getting insane or provoked. I feel like I would cut myself with Ockham's Razor if I claim a cheat there.

)[///DI50|¯)ER▄_
Offline
Joined: Jan 2011
Posts:
Re: if , else if , else .. in rotation.txt ..need help

this was the version that worked.. so i think multiple levels work

##################################################
# MAP ROTATION ~ MODIFIED BY DISORDER ~ FEB 2011 #
##################################################
 
timelimit: 20
capturelimit: 0
fraglimit: 0
if ( xp_activeClients > 8 ) { //5v5 or more
		if ( g_gametype == 4 || g_gametype == 5 || g_gametype == 6 ) {
	    if ( g_gametype == 4 ) {
	  		sv_hostname: "*(-E)+*NY*CTF*5v5+*public"
	  	} else if ( g_gametype == 5 ) {
	  		sv_hostname: "*(-E)+*NY*RTF*5v5+*public"
	  	} else if ( g_gametype == 6 ) {
	  		sv_hostname: "*(-E)+*NY*1FCTF*5v5+*public"
	  	}
	    capturelimit: 8
	    /say ^1INFO^5-5v5+gametype4,5,6-^3conditionExecuted.
	    // Ultra Large CTF Maps
	    q3w7
	    q3w8
	    q3wc2
	    q3wc3
	    q3wcp2
	    q3wcp8
	    q3wcp19
	    q3wcp22
	    // Large CTF Maps
	    mapel4b
	    ospctf1
	    ospctf2
	    q3ctf2
	    q3ctf3
	    q3ctf4
	    q3w1
	    q3w2
	    q3w3
	    q3w4
	    q3w5
	    q3wc1
	    q3wc4
	    q3wc6
	    q3wc8
	    q3wcp1
	    q3wcp3
	    q3wcp4
	    q3wcp6
	    q3wcp7
	    q3wcp9
	    q3wcp11
	    q3wcp12
	    q3wcp13
	    q3wcp14
	    q3wcp15
	    q3wcp16
	    q3wcp18
	    q3wcp20
	    q3wcp21
	    q3wcp23
	    // Medium CTF Maps
	    mkbase
	    q3ctf1
	    q3tourney6_ctf
	    q3wcp5
	    q3wcp10
	    q3wcp17
	    // Small CTF Maps
	    q3wxs1
	    q3wxs2
	    q3wxs3
	  } else if ( g_gametype == 3 || g_gametype == 0 ) {
	    if ( g_gametype == 3 ) {
	  		sv_hostname: "*(-E)+*NY*TDM*5v5+*public"
	  	} else if ( g_gametype == 0 ) {
	  		sv_hostname: "*(-E)+*NY*FFA*5v5+*public"
	  	}
	    fraglimit: 144
	    /say ^1INFO^5-5v5+gametype0,3-^3conditionExecuted.
	    // Ultra Maps
	    mrksrbrt3dm1
	    q3dm11
	    q3dm12
	    q3dm18
	    q3shw25
	    storm3tourney8
	    // Large Maps
	    6++
	    bal3dm3
	    estatica
	    geit3dm8
	    overkill
	    q3ctf4
	    q3dm10
	    q3dm14
	    q3dm15
	    q3dm17
	    q3shw21
	    q3shw24
	    q3shw26
	    storm3dm2
	    storm3tourney2
	    storm3tourney6
	    tm3_myth
	    uberkill
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm1
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	  } else if ( g_gametype == 1 || g_gametype == 8 || g_gametype == 9) {
	    if ( g_gametype == 1 ) {
	  		sv_hostname: "*(-E)+*NY*1v1*public"
	  	} else if ( g_gametype == 8 ) {
	  		sv_hostname: "*(-E)+*NY*FTAG*5v5+*public"
	  	} else if ( g_gametype == 9 ) {
	  		sv_hostname: "*(-E)+*NY*PTL*5v5+*public"
	  	}
	    fraglimit: 8
	    capturelimit: 8
	    /say ^1INFO^5-5v5+gametype1,8,9-^3conditionExecuted.
	    // Ultra Maps
	    mrksrbrt3dm1
	    q3dm11
	    q3dm12
	    q3dm18
	    q3shw25
	    storm3tourney8
	    // Large Maps
	    6++
	    bal3dm3
	    estatica
	    geit3dm8
	    overkill
	    q3ctf4
	    q3dm10
	    q3dm14
	    q3dm15
	    q3dm17
	    q3shw21
	    q3shw24
	    q3shw26
	    storm3dm2
	    storm3tourney2
	    storm3tourney6
	    tm3_myth
	    uberkill
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm1
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	  }
	} else if ( xp_activeClients > 6 ) { //4v4
		if ( g_gametype == 4 || g_gametype == 5 || g_gametype == 6 ) {
	    if ( g_gametype == 4 ) {
	  		sv_hostname: "*(-E)+*NY*CTF*4v4*public"
	  	} else if ( g_gametype == 5 ) {
	  		sv_hostname: "*(-E)+*NY*RTF*4v4*public"
	  	} else if ( g_gametype == 6 ) {
	  		sv_hostname: "*(-E)+*NY*1FCTF*4v4*public"
	  	}
	    capturelimit: 8
	    /say ^1INFO^5-4v4gametype4,5,6-^3conditionExecuted.
	    // Ultra Large CTF Maps
	    q3w7
	    q3wcp2
	    q3wcp8
	    q3wcp22
	    // Large CTF Maps
	    mapel4b
	    ospctf2
	    q3ctf2
	    q3ctf3
	    q3ctf4
	    q3w1
	    q3w2
	    q3w3
	    q3w4
	    q3w5
	    q3wcp1
	    q3wcp6
	    q3wcp7
	    q3wcp9
	    q3wcp12
	    q3wcp14
	    q3wcp16
	    q3wcp18
	    q3wcp21
	    q3wcp23
	    // Medium CTF Maps
	    mkbase
	    q3ctf1
	    q3tourney6_ctf
	    q3wcp5
	    q3wcp10
	    q3wcp17
	    // Small CTF Maps
	    q3wxs1
	    q3wxs2
	    q3wxs3
	  } else if ( g_gametype == 3 || g_gametype == 0 ) {
	    if ( g_gametype == 3 ) {
	  		sv_hostname: "*(-E)+*NY*TDM*4v4*public"
	  	} else if ( g_gametype == 0 ) {
	  		sv_hostname: "*(-E)+*NY*FFA*4v4*public"
	  	}
	    fraglimit: 89
	    /say ^1INFO^5-4v4gametype0,3-^3conditionExecuted.
	    // Ultra Maps
	    mrksrbrt3dm1
	    q3dm18    
	    storm3tourney8
	    // Large Maps
	    6++
	    bal3dm3
	    estatica
	    overkill
	    q3ctf4
	    q3dm10
	    q3dm14
	    q3dm15
	    q3dm17
	    q3shw21
	    q3shw24
	    q3shw26
	    storm3dm2
	    storm3tourney2
	    storm3tourney6
	    tm3_myth
	    uberkill
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm1
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    charon3dm5
	    charon3dm8
	    charon3dm10
	    charon3dm13
	    cpm8
	    ospdm3
	    ospdm9
	    ospdm10
	    pro-q3tourney4
	    q3tourney4
	    q3shw23
	    unitooldm4
	  } else if ( g_gametype == 1 || g_gametype == 8 || g_gametype == 9) {
	    if ( g_gametype == 1 ) {
	  		sv_hostname: "*(-E)+*NY*1v1*public"
	  	} else if ( g_gametype == 8 ) {
	  		sv_hostname: "*(-E)+*NY*FTAG*4v4*public"
	  	} else if ( g_gametype == 9 ) {
	  		sv_hostname: "*(-E)+*NY*PTL*4v4*public"
	  	}
	    fraglimit: 8
	    capturelimit: 8
	    /say ^1INFO^5-4v4gametype1,8,9-^3conditionExecuted.
	    // Ultra Maps
	    mrksrbrt3dm1
	    q3dm18    
	    storm3tourney8
	    // Large Maps
	    6++
	    bal3dm3
	    estatica
	    overkill
	    q3ctf4
	    q3dm10
	    q3dm14
	    q3dm15
	    q3dm17
	    q3shw21
	    q3shw24
	    q3shw26
	    storm3dm2
	    storm3tourney2
	    storm3tourney6
	    tm3_myth
	    uberkill
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm1
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    charon3dm5
	    charon3dm8
	    charon3dm10
	    charon3dm13
	    cpm8
	    ospdm3
	    ospdm9
	    ospdm10
	    pro-q3tourney4
	    q3tourney4
	    q3shw23
	    unitooldm4 
	  } 
	} else if ( xp_activeClients > 4 ) { //3v3
		if ( g_gametype == 4 || g_gametype == 5 || g_gametype == 6 ) {
	    if ( g_gametype == 4 ) {
	  		sv_hostname: "*(-E)+*NY*CTF*3v3*public"
	  	} else if ( g_gametype == 5 ) {
	  		sv_hostname: "*(-E)+*NY*RTF*3v3*public"
	  	} else if ( g_gametype == 6 ) {
	  		sv_hostname: "*(-E)+*NY*1FCTF*3v3*public"
	  	}
	    capturelimit: 10
	    /say ^1INFO^5-3v3gametype4,5,6-^3conditionExecuted.
	    // Large CTF Maps
	    mapel4b
	    ospctf2
	    q3ctf2
	    q3ctf3
	    q3ctf4
	    q3w1
	    q3w2
	    q3w3
	    q3w4
	    q3w5
	    q3wcp1
	    q3wcp6
	    q3wcp7
	    q3wcp9
	    q3wcp12
	    q3wcp14
	    q3wcp16
	    q3wcp18
	    q3wcp21
	    q3wcp23
	    // Medium CTF Maps
	    mkbase
	    q3ctf1
	    q3wcp5
	    q3wcp17
	    // Small CTF Maps
	    q3wxs1
	    q3wxs2
	    q3wxs3
	  } else if ( g_gametype == 3 || g_gametype == 0 ) {
	    if ( g_gametype == 3 ) {
	  		sv_hostname: "*(-E)+*NY*TDM*3v3*public"
	  	} else if ( g_gametype == 0 ) {
	  		sv_hostname: "*(-E)+*NY*FFA*3v3*public"
	  	}
	    fraglimit: 89
	    /say ^1INFO^5-3v3gametype0,3-^3conditionExecuted.
	    // Ultra Maps
	    // Large Maps
	    estatica
	    overkill
	    q3ctf4
	    q3dm17
	    tm3_myth
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    charon3dm5
	    charon3dm8
	    charon3dm10
	    charon3dm13
	    cpm8
	    ospdm3
	    ospdm9
	    ospdm10
	    pro-q3tourney4
	    q3tourney4
	    q3shw23
	    unitooldm4
	  } else if ( g_gametype == 1 || g_gametype == 8 || g_gametype == 9) {
	    if ( g_gametype == 1 ) {
	  		sv_hostname: "*(-E)+*NY*1v1*public"
	  	} else if ( g_gametype == 8 ) {
	  		sv_hostname: "*(-E)+*NY*FTAG*3v3*public"
	  	} else if ( g_gametype == 9 ) {
	  		sv_hostname: "*(-E)+*NY*PTL*3v3*public"
	  	}
	    fraglimit: 10
	    capturelimit: 10
	    /say ^1INFO^5-3v3gametype1,8,9-^3conditionExecuted.
	    // Ultra Maps
	    // Large Maps
	    estatica
	    overkill
	    q3ctf4
	    q3dm17
	    tm3_myth
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    charon3dm5
	    charon3dm8
	    charon3dm10
	    charon3dm13
	    cpm8
	    ospdm3
	    ospdm9
	    ospdm10
	    pro-q3tourney4
	    q3tourney4
	    q3shw23
	    unitooldm4
	  }
	} else { //2v2
		if ( g_gametype == 4 || g_gametype == 5 || g_gametype == 6 ) {
	    if ( g_gametype == 4 ) {
	  		sv_hostname: "*(-E)+*NY*CTF*2v2*public"
	  	} else if ( g_gametype == 5 ) {
	  		sv_hostname: "*(-E)+*NY*RTF*2v2*public"
	  	} else if ( g_gametype == 6 ) {
	  		sv_hostname: "*(-E)+*NY*1FCTF*2v2*public"
	  	}
	    capturelimit: 8
	    /say ^1INFO^5-2v2gametype4,5,6-^3conditionExecuted.
	    // Medium CTF Maps
	    mkbase
	    q3ctf1
	    q3wcp5
	    q3wcp17
	    // Small CTF Maps
	    q3wxs1
	    q3wxs2
	    q3wxs3    
	  } else if ( g_gametype == 3 || g_gametype == 0 ) {
	  	if ( g_gametype == 3 ) {
	  		sv_hostname: "*(-E)+*NY*TDM*2v2*public"
	  	} else if ( g_gametype == 0 ) {
	  		sv_hostname: "*(-E)+*NY*FFA*2v2*public"
	  	}
	    fraglimit: 34
	    /say ^1INFO^5-2v2gametype0,3-^3conditionExecuted.
	    q3dm17
	    // Ultra Maps
	    // Large Maps
	    estatica
	    q3dm17
	    // Medium Maps
	    cpm12
	    jaxdm8
	    pro-q3dm6
	    pro-q3tourney2
	    pro-q3tourney7
	    q3dm2
	    q3dm4
	    q3dm5    
	    q3dm19
	    q3tourney1
	    q3tourney2
	    q3tourney6    
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    akumaq3dm8
	    charon3dm3
	    charon3dm13
	    cpm1a
	    cpm8
	    cpm22
	    ospdm10
	    pro-q3tourney4
	    q3dm3
	    q3tourney3
	    q3tourney4    
	    q3shw23
	    unitooldm4
	    unitooldm5
	  } else if ( g_gametype == 1 || g_gametype == 8 || g_gametype == 9) {
	  	if ( g_gametype == 1 ) {
	  		sv_hostname: "*(-E)+*NY*1v1*public"
	  	} else if ( g_gametype == 8 ) {
	  		sv_hostname: "*(-E)+*NY*FTAG*2v2*public"
	  	} else if ( g_gametype == 9 ) {
	  		sv_hostname: "*(-E)+*NY*PTL*2v2*public"
	  	}
			fraglimit: 8
	    capturelimit: 8    
	    /say ^1INFO^5-2v2gametype1,8,9-^3conditionExecuted.
	    /say $(xp_config)
	    pro-q3dm6
	    // Ultra Maps
	    // Large Maps
	    estatica
	    q3dm17
	    // Medium Maps
	    cpm12
	    jaxdm8
	    pro-q3dm6
	    pro-q3tourney2
	    pro-q3tourney7
	    q3dm2
	    q3dm4
	    q3dm5    
	    q3dm19
	    q3tourney1
	    q3tourney2
	    q3tourney6    
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    akumaq3dm8
	    charon3dm3
	    charon3dm13
	    cpm1a
	    cpm8
	    cpm22
	    ospdm10
	    pro-q3tourney4
	    q3dm3
	    q3tourney3
	    q3tourney4    
	    q3shw23
	    unitooldm4
	    unitooldm5
	  }       
	}

and this is what i'm try to make it

##################################################
# MAP ROTATION ~ MODIFIED BY DISORDER ~ FEB 2011 #
##################################################
 
// this will be executed before each map
timelimit: 20
capturelimit: 0
fraglimit: 0
if ( $xp_config == "fn1.cfg" || $xp_config == "fn2.cfg" || $xp_config == "fn3.cfg"  || $xp_config == "fn4.cfg" ) {
	if ( $xp_config == "fn1.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*CA*FTAG*"
		g_gametype: 8
		q3dm6
	} else if ( $xp_config == "fn2.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*VANILLA*TDM*"
		g_gametype: 3
		pro-q3dm6
	} else if ( $xp_config == "fn3.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*INSTAGIB*FTAG*"
		g_gametype: 8
		q3dm6
	} else if ( $xp_config == "fn4.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*INSTAGIB*CTF*"
		g_gametype: 5
		q3ctf1
	} else {
		sv_hostname: "*error*"
		q3dm0
	}
} else {
	if ( xp_activeClients > 8 ) { //5v5 or more
		if ( g_gametype == 4 || g_gametype == 5 || g_gametype == 6 ) {
	    if ( g_gametype == 4 ) {
	  		sv_hostname: "*(-E)+*NY*CTF*5v5+*public"
	  	} else if ( g_gametype == 5 ) {
	  		sv_hostname: "*(-E)+*NY*RTF*5v5+*public"
	  	} else if ( g_gametype == 6 ) {
	  		sv_hostname: "*(-E)+*NY*1FCTF*5v5+*public"
	  	}
	    capturelimit: 8
	    /say ^1INFO^5-5v5+gametype4,5,6-^3conditionExecuted.
	    // Ultra Large CTF Maps
	    q3w7
	    q3w8
	    q3wc2
	    q3wc3
	    q3wcp2
	    q3wcp8
	    q3wcp19
	    q3wcp22
	    // Large CTF Maps
	    mapel4b
	    ospctf1
	    ospctf2
	    q3ctf2
	    q3ctf3
	    q3ctf4
	    q3w1
	    q3w2
	    q3w3
	    q3w4
	    q3w5
	    q3wc1
	    q3wc4
	    q3wc6
	    q3wc8
	    q3wcp1
	    q3wcp3
	    q3wcp4
	    q3wcp6
	    q3wcp7
	    q3wcp9
	    q3wcp11
	    q3wcp12
	    q3wcp13
	    q3wcp14
	    q3wcp15
	    q3wcp16
	    q3wcp18
	    q3wcp20
	    q3wcp21
	    q3wcp23
	    // Medium CTF Maps
	    mkbase
	    q3ctf1
	    q3tourney6_ctf
	    q3wcp5
	    q3wcp10
	    q3wcp17
	    // Small CTF Maps
	    q3wxs1
	    q3wxs2
	    q3wxs3
	  } else if ( g_gametype == 3 || g_gametype == 0 ) {
	    if ( g_gametype == 3 ) {
	  		sv_hostname: "*(-E)+*NY*TDM*5v5+*public"
	  	} else if ( g_gametype == 0 ) {
	  		sv_hostname: "*(-E)+*NY*FFA*5v5+*public"
	  	}
	    fraglimit: 144
	    /say ^1INFO^5-5v5+gametype0,3-^3conditionExecuted.
	    // Ultra Maps
	    mrksrbrt3dm1
	    q3dm11
	    q3dm12
	    q3dm18
	    q3shw25
	    storm3tourney8
	    // Large Maps
	    6++
	    bal3dm3
	    estatica
	    geit3dm8
	    overkill
	    q3ctf4
	    q3dm10
	    q3dm14
	    q3dm15
	    q3dm17
	    q3shw21
	    q3shw24
	    q3shw26
	    storm3dm2
	    storm3tourney2
	    storm3tourney6
	    tm3_myth
	    uberkill
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm1
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	  } else if ( g_gametype == 1 || g_gametype == 8 || g_gametype == 9) {
	    if ( g_gametype == 1 ) {
	  		sv_hostname: "*(-E)+*NY*1v1*public"
	  	} else if ( g_gametype == 8 ) {
	  		sv_hostname: "*(-E)+*NY*FTAG*5v5+*public"
	  	} else if ( g_gametype == 9 ) {
	  		sv_hostname: "*(-E)+*NY*PTL*5v5+*public"
	  	}
	    fraglimit: 8
	    capturelimit: 8
	    /say ^1INFO^5-5v5+gametype1,8,9-^3conditionExecuted.
	    // Ultra Maps
	    mrksrbrt3dm1
	    q3dm11
	    q3dm12
	    q3dm18
	    q3shw25
	    storm3tourney8
	    // Large Maps
	    6++
	    bal3dm3
	    estatica
	    geit3dm8
	    overkill
	    q3ctf4
	    q3dm10
	    q3dm14
	    q3dm15
	    q3dm17
	    q3shw21
	    q3shw24
	    q3shw26
	    storm3dm2
	    storm3tourney2
	    storm3tourney6
	    tm3_myth
	    uberkill
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm1
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	  }
	} else if ( xp_activeClients > 6 ) { //4v4
		if ( g_gametype == 4 || g_gametype == 5 || g_gametype == 6 ) {
	    if ( g_gametype == 4 ) {
	  		sv_hostname: "*(-E)+*NY*CTF*4v4*public"
	  	} else if ( g_gametype == 5 ) {
	  		sv_hostname: "*(-E)+*NY*RTF*4v4*public"
	  	} else if ( g_gametype == 6 ) {
	  		sv_hostname: "*(-E)+*NY*1FCTF*4v4*public"
	  	}
	    capturelimit: 8
	    /say ^1INFO^5-4v4gametype4,5,6-^3conditionExecuted.
	    // Ultra Large CTF Maps
	    q3w7
	    q3wcp2
	    q3wcp8
	    q3wcp22
	    // Large CTF Maps
	    mapel4b
	    ospctf2
	    q3ctf2
	    q3ctf3
	    q3ctf4
	    q3w1
	    q3w2
	    q3w3
	    q3w4
	    q3w5
	    q3wcp1
	    q3wcp6
	    q3wcp7
	    q3wcp9
	    q3wcp12
	    q3wcp14
	    q3wcp16
	    q3wcp18
	    q3wcp21
	    q3wcp23
	    // Medium CTF Maps
	    mkbase
	    q3ctf1
	    q3tourney6_ctf
	    q3wcp5
	    q3wcp10
	    q3wcp17
	    // Small CTF Maps
	    q3wxs1
	    q3wxs2
	    q3wxs3
	  } else if ( g_gametype == 3 || g_gametype == 0 ) {
	    if ( g_gametype == 3 ) {
	  		sv_hostname: "*(-E)+*NY*TDM*4v4*public"
	  	} else if ( g_gametype == 0 ) {
	  		sv_hostname: "*(-E)+*NY*FFA*4v4*public"
	  	}
	    fraglimit: 89
	    /say ^1INFO^5-4v4gametype0,3-^3conditionExecuted.
	    // Ultra Maps
	    mrksrbrt3dm1
	    q3dm18    
	    storm3tourney8
	    // Large Maps
	    6++
	    bal3dm3
	    estatica
	    overkill
	    q3ctf4
	    q3dm10
	    q3dm14
	    q3dm15
	    q3dm17
	    q3shw21
	    q3shw24
	    q3shw26
	    storm3dm2
	    storm3tourney2
	    storm3tourney6
	    tm3_myth
	    uberkill
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm1
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    charon3dm5
	    charon3dm8
	    charon3dm10
	    charon3dm13
	    cpm8
	    ospdm3
	    ospdm9
	    ospdm10
	    pro-q3tourney4
	    q3tourney4
	    q3shw23
	    unitooldm4
	  } else if ( g_gametype == 1 || g_gametype == 8 || g_gametype == 9) {
	    if ( g_gametype == 1 ) {
	  		sv_hostname: "*(-E)+*NY*1v1*public"
	  	} else if ( g_gametype == 8 ) {
	  		sv_hostname: "*(-E)+*NY*FTAG*4v4*public"
	  	} else if ( g_gametype == 9 ) {
	  		sv_hostname: "*(-E)+*NY*PTL*4v4*public"
	  	}
	    fraglimit: 8
	    capturelimit: 8
	    /say ^1INFO^5-4v4gametype1,8,9-^3conditionExecuted.
	    // Ultra Maps
	    mrksrbrt3dm1
	    q3dm18    
	    storm3tourney8
	    // Large Maps
	    6++
	    bal3dm3
	    estatica
	    overkill
	    q3ctf4
	    q3dm10
	    q3dm14
	    q3dm15
	    q3dm17
	    q3shw21
	    q3shw24
	    q3shw26
	    storm3dm2
	    storm3tourney2
	    storm3tourney6
	    tm3_myth
	    uberkill
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm1
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    charon3dm5
	    charon3dm8
	    charon3dm10
	    charon3dm13
	    cpm8
	    ospdm3
	    ospdm9
	    ospdm10
	    pro-q3tourney4
	    q3tourney4
	    q3shw23
	    unitooldm4 
	  } 
	} else if ( xp_activeClients > 4 ) { //3v3
		if ( g_gametype == 4 || g_gametype == 5 || g_gametype == 6 ) {
	    if ( g_gametype == 4 ) {
	  		sv_hostname: "*(-E)+*NY*CTF*3v3*public"
	  	} else if ( g_gametype == 5 ) {
	  		sv_hostname: "*(-E)+*NY*RTF*3v3*public"
	  	} else if ( g_gametype == 6 ) {
	  		sv_hostname: "*(-E)+*NY*1FCTF*3v3*public"
	  	}
	    capturelimit: 10
	    /say ^1INFO^5-3v3gametype4,5,6-^3conditionExecuted.
	    // Large CTF Maps
	    mapel4b
	    ospctf2
	    q3ctf2
	    q3ctf3
	    q3ctf4
	    q3w1
	    q3w2
	    q3w3
	    q3w4
	    q3w5
	    q3wcp1
	    q3wcp6
	    q3wcp7
	    q3wcp9
	    q3wcp12
	    q3wcp14
	    q3wcp16
	    q3wcp18
	    q3wcp21
	    q3wcp23
	    // Medium CTF Maps
	    mkbase
	    q3ctf1
	    q3wcp5
	    q3wcp17
	    // Small CTF Maps
	    q3wxs1
	    q3wxs2
	    q3wxs3
	  } else if ( g_gametype == 3 || g_gametype == 0 ) {
	    if ( g_gametype == 3 ) {
	  		sv_hostname: "*(-E)+*NY*TDM*3v3*public"
	  	} else if ( g_gametype == 0 ) {
	  		sv_hostname: "*(-E)+*NY*FFA*3v3*public"
	  	}
	    fraglimit: 89
	    /say ^1INFO^5-3v3gametype0,3-^3conditionExecuted.
	    // Ultra Maps
	    // Large Maps
	    estatica
	    overkill
	    q3ctf4
	    q3dm17
	    tm3_myth
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    charon3dm5
	    charon3dm8
	    charon3dm10
	    charon3dm13
	    cpm8
	    ospdm3
	    ospdm9
	    ospdm10
	    pro-q3tourney4
	    q3tourney4
	    q3shw23
	    unitooldm4
	  } else if ( g_gametype == 1 || g_gametype == 8 || g_gametype == 9) {
	    if ( g_gametype == 1 ) {
	  		sv_hostname: "*(-E)+*NY*1v1*public"
	  	} else if ( g_gametype == 8 ) {
	  		sv_hostname: "*(-E)+*NY*FTAG*3v3*public"
	  	} else if ( g_gametype == 9 ) {
	  		sv_hostname: "*(-E)+*NY*PTL*3v3*public"
	  	}
	    fraglimit: 10
	    capturelimit: 10
	    /say ^1INFO^5-3v3gametype1,8,9-^3conditionExecuted.
	    // Ultra Maps
	    // Large Maps
	    estatica
	    overkill
	    q3ctf4
	    q3dm17
	    tm3_myth
	    // Medium Maps
	    16+
	    cpm2
	    cpm12
	    jaxdm6
	    jaxdm8
	    jaxdm9
	    ospdm2
	    ospdm4
	    ospdm6
	    ospdm8
	    ospdm11
	    pro-dcmap7
	    pro-q3dm6
	    pro-q3dm13
	    pro-q3tourney2
	    pro-q3tourney7
	    q3ctf1
	    q3dm7
	    q3dm8
	    q3dm9
	    q3dm16
	    q3dm19
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    charon3dm5
	    charon3dm8
	    charon3dm10
	    charon3dm13
	    cpm8
	    ospdm3
	    ospdm9
	    ospdm10
	    pro-q3tourney4
	    q3tourney4
	    q3shw23
	    unitooldm4
	  }
	} else { //2v2
		if ( g_gametype == 4 || g_gametype == 5 || g_gametype == 6 ) {
	    if ( g_gametype == 4 ) {
	  		sv_hostname: "*(-E)+*NY*CTF*2v2*public"
	  	} else if ( g_gametype == 5 ) {
	  		sv_hostname: "*(-E)+*NY*RTF*2v2*public"
	  	} else if ( g_gametype == 6 ) {
	  		sv_hostname: "*(-E)+*NY*1FCTF*2v2*public"
	  	}
	    capturelimit: 8
	    /say ^1INFO^5-2v2gametype4,5,6-^3conditionExecuted.
	    // Medium CTF Maps
	    mkbase
	    q3ctf1
	    q3wcp5
	    q3wcp17
	    // Small CTF Maps
	    q3wxs1
	    q3wxs2
	    q3wxs3    
	  } else if ( g_gametype == 3 || g_gametype == 0 ) {
	  	if ( g_gametype == 3 ) {
	  		sv_hostname: "*(-E)+*NY*TDM*2v2*public"
	  	} else if ( g_gametype == 0 ) {
	  		sv_hostname: "*(-E)+*NY*FFA*2v2*public"
	  	}
	    fraglimit: 34
	    /say ^1INFO^5-2v2gametype0,3-^3conditionExecuted.
	    q3dm17
	    // Ultra Maps
	    // Large Maps
	    estatica
	    q3dm17
	    // Medium Maps
	    cpm12
	    jaxdm8
	    pro-q3dm6
	    pro-q3tourney2
	    pro-q3tourney7
	    q3dm2
	    q3dm4
	    q3dm5    
	    q3dm19
	    q3tourney1
	    q3tourney2
	    q3tourney6    
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    akumaq3dm8
	    charon3dm3
	    charon3dm13
	    cpm1a
	    cpm8
	    cpm22
	    ospdm10
	    pro-q3tourney4
	    q3dm3
	    q3tourney3
	    q3tourney4    
	    q3shw23
	    unitooldm4
	    unitooldm5
	  } else if ( g_gametype == 1 || g_gametype == 8 || g_gametype == 9) {
	  	if ( g_gametype == 1 ) {
	  		sv_hostname: "*(-E)+*NY*1v1*public"
	  	} else if ( g_gametype == 8 ) {
	  		sv_hostname: "*(-E)+*NY*FTAG*2v2*public"
	  	} else if ( g_gametype == 9 ) {
	  		sv_hostname: "*(-E)+*NY*PTL*2v2*public"
	  	}
			fraglimit: 8
	    capturelimit: 8    
	    /say ^1INFO^5-2v2gametype1,8,9-^3conditionExecuted.
	    /say $(xp_config)
	    pro-q3dm6
	    // Ultra Maps
	    // Large Maps
	    estatica
	    q3dm17
	    // Medium Maps
	    cpm12
	    jaxdm8
	    pro-q3dm6
	    pro-q3tourney2
	    pro-q3tourney7
	    q3dm2
	    q3dm4
	    q3dm5    
	    q3dm19
	    q3tourney1
	    q3tourney2
	    q3tourney6    
	    storm3tourney1
	    storm3tourney5
	    ztn3dm1
	    // Small Maps
	    akumaq3dm8
	    charon3dm3
	    charon3dm13
	    cpm1a
	    cpm8
	    cpm22
	    ospdm10
	    pro-q3tourney4
	    q3dm3
	    q3tourney3
	    q3tourney4    
	    q3shw23
	    unitooldm4
	    unitooldm5
	  }       
	}
}

BOZO
Bozo's picture
Offline
Joined: Feb 2010
Posts:
Re: if , else if , else .. in rotation.txt ..need help

Of course it works in multiple levels, but not in the way you did in your first post.

After that you know that $xp_config == "dc01.cfg" is true it's completely useless to test $xp_config for fn1.cfg, fn2.cfg, fn3.cfg, fn4.cfg. These can never be true!

^t
smasherchif's picture
Offline
Joined: Oct 2009
Posts:
Re: if , else if , else .. in rotation.txt ..need help

if ( $xp_config == "dc01.cfg" ) {
	if ( $xp_config == "fn1.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*CA*FTAG*"
		g_gametype: 8
		q3dm6
	} else if ( $xp_config == "fn2.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*VANILLA*TDM*"
		g_gametype: 3
		pro-q3dm6
	} else if ( $xp_config == "fn3.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*INSTAGIB*FTAG*"
		g_gametype: 8
		q3dm6
	} else if ( $xp_config == "fn4.cfg" ) {
		sv_hostname: "*FRAGGEDNATION*E+*INSTAGIB*CTF*"
		g_gametype: 5
		q3ctf1
	} else {
		sv_hostname: "*error*"
		q3dm0
	}
} 

the above code doesn't make sense, cuz no of the subconditions will be ever met. so could you plz explain what you are trying to achieve?

ok, you have an advisor Tongue i'm out. it's too crowded here Big grin


.aNk/xXxp4l/:bR.Shady'XYN! wrote:
Fuck! I just thought of the most awesome pun about the BC vs Smurfs final game and the flames that followed :
"In Soviet Moldavia, Pole rages YOU"
like 2 months after Call me

3M'darkangel wrote:
// 09:30:49 27.06.2010, UNKNOWN LOCATION,
Name { "Biotoxin" }
IP { "localhost" }

SHUDDER wrote:
People are training hard to hide their autoshoot so well while gain enough skills to win (or at least compete on similar level) without them. This is getting insane or provoked. I feel like I would cut myself with Ockham's Razor if I claim a cheat there.

)[///DI50|¯)ER▄_
Offline
Joined: Jan 2011
Posts:
Re: if , else if , else .. in rotation.txt ..need help

ya i was inbetween editing the post..anyway, to make things simple.. the if then statements are all right, i'm just wondering if there is a special way i should be calling the config check statement.
Thanks

)[///DI50|¯)ER▄_
Offline
Joined: Jan 2011
Posts:
Re: if , else if , else .. in rotation.txt ..need help

well couldn't figure it out, so just used another var instead. seems to work, but thanks for the help here.