BitExtract

From Multi Theft Auto: Wiki
Revision as of 12:06, 2 June 2013 by Jusonex (talk | contribs) (Created page with "{{Server client function}} {{Needs_Example}} __NOTOC__ {{New feature/item|3.0132|1.3.2|5340| This function returns the unsigned number formed by the bits field to field + width -...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Accessories-text-editor.png Script Example Missing Function BitExtract needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.


This function returns the unsigned number formed by the bits field to field + width - 1 (range: 0-31).

Syntax

uint bitExtract ( uint var, int field, [int width = 1] )

Required arguments

  • var: The value
  • field: The field number
  • width: Number of bits to extract

Returns

Returns the extracted value/bit sequence.

Example

ToDo

See Also