WriteInt: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Welcome|desc=This will write an integer to the given blob.|params=<source lang="lua">( b, int )</source><poem> | {{Welcome|desc=This will write an integer(4 bytes) to the given blob which can be later passed to [[SendServerData]].|params=<source lang="lua">( b, int )</source><poem> | ||
::b : The blob in which to write the integer. | ::b : The blob in which to write the integer. | ||
::int : The integer to be written | ::int : The integer to be written | ||
</poem>| | </poem>| | ||
example=<source lang="lua"> | |||
local b=blob(); | |||
WriteInt(b, 123456 ); | |||
SendServerData(b);</source>| | |||
retvals=The function returns true on success.| | |||
relfuncs=*[[WriteByte]] | |||
*[[WriteFloat]] | |||
*[[WriteString]] | |||
*[[SendServerData]]}} |
Latest revision as of 05:52, 24 June 2023
Description:
This will write an integer(4 bytes) to the given blob which can be later passed to SendServerData.
Parameters:
( b, int )
b : The blob in which to write the integer.
int : The integer to be written
Return Values:
The function returns true on success.
Example
local b=blob(); WriteInt(b, 123456 ); SendServerData(b);
Related Functions
The following functions may be helpful as they relate to this function in one way or another.