BitNot: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Fixed version)
Line 18: Line 18:


==Example==
==Example==
<section name="server" class="server" show="true">
--In this example we make a command which you can do a bitNot operator
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
ToDo
function bitnot(thePlayer,cmd,value)
 
    outputChatBox(bitNot(value),thePlayer)
 
end
 
addCommandHandler("bitnot",bitnotFunc)
</syntaxhighlight>
</syntaxhighlight>
</section>


==See Also==
==See Also==
{{Bit_functions}}
{{Bit_functions}}

Revision as of 15:37, 14 September 2014

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

Before submitting check out Editing Guidelines Script Examples.


This function performs a bitwise NOT on an (unsigned) 32-bit integer. See Bitwise operation for more details.

Syntax

uint bitNot ( uint var )

Required arguments

  • var: The value you want to perform a bitwise NOT on

Returns

Returns the value on which the operation has been performed.

Example

Click to collapse [-]
server

--In this example we make a command which you can do a bitNot operator

function bitnot(thePlayer,cmd,value)

    outputChatBox(bitNot(value),thePlayer)

end

addCommandHandler("bitnot",bitnotFunc)

See Also