Revision Difference
net.WriteUInt64#561012
<function name="WriteUInt64" parent="net" type="libraryfunc">
<description>
Appends an unsigned integer with 64 bits to the current net message.
<note>⤶
The limit for an uint64 is 18'446'744'073'709'551'615.
Everything above the limit will be set to the limit.
Unsigned numbers **do not** support negative numbers. ⤶
</note>⤶
</description>⤶
⤶
The limit for an uint64 is 18'446'744'073'709'551'615. ⤶
Everything above the limit will be set to the limit.
⤶
Unsigned numbers **do not** support negative numbers.
</description>⤶
<realm>Shared</realm>
<added>2023.08.30</added>
<args>
<arg name="uint64" type="string">The uint64 to be sent. Can be a number.
<arg name="uint64" type="string">The 64 bit value to be sent. Can be a number.
<warning>
Since Lua cannot store full 64-bit integers, this function returns a string. It is mainly aimed at usage with <page>Player:SteamID64</page>.
Since Lua cannot store full 64-bit integers, this function takes a string. It is mainly aimed at usage with <page>Player:SteamID64</page>.
If your input is a number and not a string, it won't be networked correctly as soon as it has more than 13 digits.
This is because Lua represents numbers over 13 digits as `1e+14`(`100 000 000 000 000`)
You can do something like this to convert it to a string: `string.format("%.0f", number)`.
If you try to use <page>Global.tostring</page> it will fail because it will create a result something like `1e+14` which doesn't work.
</warning>
</arg>
</args>
</function>