MTA:Eir/FileSystem/file/writeUShort: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ This function attempts to write an unsigned short integer into a file/stream and returns how many bytes have actually been written. The amount of bytes written should b...")
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
int file.writeUShort ( unsigned_short value )
int file:writeUShort ( unsigned_short value )
</syntaxhighlight>
</syntaxhighlight>


Line 11: Line 11:


==Returns==
==Returns==
Returns the amount of bytes written during the write operation. Return false if '''value'''is not a valid number type.
Returns the amount of bytes written during the write operation. Return false if '''value''' is not a valid number type.


==Example==
==Example==
todo.
todo.
{{:MTA:Eir/FileSystem/file/functions}}
{{:MTA:Eir/FileSystem/file/functions}}

Latest revision as of 23:46, 16 January 2022

This function attempts to write an unsigned short integer into a file/stream and returns how many bytes have actually been written. The amount of bytes written should be two.

Syntax

int file:writeUShort ( unsigned_short value )

Arguments

  • value: a number in the range of [0..65535] to write into the file/stream

Returns

Returns the amount of bytes written during the write operation. Return false if value is not a valid number type.

Example

todo.

FileSystem File Functions