Garry's Mod Wiki

Revision Difference

Global.BRANCH#560354

<cat>global</cat>⤶ <title>BRANCH</title>⤶ `BRANCH` is a variable containing a string indicating which (Beta) Branch of the game you are using. ⤶ This variable is only setup in **Client and Menu <page text="Realms">States</page>** There is no steam client context on a dedicated server. ⤶ For more information on beta branches, see <page text="this page">Dev_Branch</page> ⤶ # Usage⤶ <note>This is NOT a function, it's a variable containing a string.</note>⤶ <example>⤶ <function name="BRANCH" parent="Global" type="libraryfield">⤶ <description>⤶ A variable containing a string indicating which (Beta) Branch of the game you are using. ⤶ This variable is only setup in **Client and Menu <page text="Realms">States</page>** There is no steam client context on a dedicated server. ⤶ For more information on beta branches, see <page text="this page">Dev_Branch</page> </description>⤶ <realm>Shared and Menu</realm>⤶ <rets>⤶ <ret name="" type="string">The current branch.</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <code> if BRANCH == "dev" then print("You are using the development branch!") end </code> </example> The possible outputs are `unknown` (None), `dev`, `prerelease` and `x86-64`