Revision Difference
Global.GetGlobalInt#514919
<function name="GetGlobalInt" parent="Global" type="libraryfunc">⤶
<description>⤶
Returns an integer that is shared between the server and all clients.⤶
⤶
<bug issue="3374">This function will not round decimal values as it actually networks a float internally.</bug>⤶
</description>⤶
<realm>Shared</realm>⤶
<args>⤶
<arg name="index" type="string">The unique index to identify the global value with.</arg>⤶
<arg name="default" type="number" default="0">The value to return if the global value is not set.</arg>⤶
</args>⤶
<rets>⤶
<ret name="" type="number">The global value, or the default if the global value is not set.</ret>⤶
</rets>⤶
</function>⤶
⤶
<example>⤶
<description>Prints the current round number if set, otherwise 0.</description>⤶
<code>print(GetGlobalInt("RoundNumber", 0))</code>⤶
⤶
</example>