Difference between revisions of "Game Switcher Scripting Variables"

(Created page with "These variables will have values greater than 0 only if the game server is being switched to a new game. ; SwitchGameFrom : If the game server is being switched to a new game...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
These variables will have values greater than 0 only if the game server is being switched to a new game.
+
These variables are available in the before game switch and after game switch events.
  
 
; SwitchGameFrom
 
; SwitchGameFrom
Line 9: Line 9:
 
=== Windows batch script ===
 
=== Windows batch script ===
 
  @echo off
 
  @echo off
  if %SwitchGameTo% gtr 0 (
+
  echo Switching from game id %SwitchGameFrom% to %SwitchGameTo%
  echo Switching from game id %SwitchGameFrom% to %SwitchGameTo%
 
)
 
  
 
=== Linux shell script ===
 
=== Linux shell script ===
  if [ "$SwitchGameTo" -gt "0" ]; then
+
  echo Switching from game id $SwitchGameFrom to $SwitchGameTo
  echo Switching from game id $SwitchGameFrom to $SwitchGameTo
 
fi
 
  
 
=== IronPython script ===
 
=== IronPython script ===
   if SwitchGameTo > 0 :
+
   Script.WriteToConsole("Switching from game id " + str(SwitchGameFrom) + " to " + str(SwitchGameTo))
  Script.WriteToConsole("Switching from game id " + str(SwitchGameFrom) + " to " + str(SwitchGameTo))
 

Latest revision as of 13:27, 30 October 2022

These variables are available in the before game switch and after game switch events.

SwitchGameFrom
If the game server is being switched to a new game this value is the current game id.
SwitchGameTo
If the game server is being switched to a new game this value is the new game id.

Examples

Windows batch script

@echo off
echo Switching from game id %SwitchGameFrom% to %SwitchGameTo%

Linux shell script

echo Switching from game id $SwitchGameFrom to $SwitchGameTo

IronPython script

 Script.WriteToConsole("Switching from game id " + str(SwitchGameFrom) + " to " + str(SwitchGameTo))
Retrieved from "https://help.tcadmin.com/index.php?title=Game_Switcher_Scripting_Variables&oldid=2509"