Inspect: Difference between revisions
Jump to navigation
Jump to search
m (→Example) |
m (added image to example) |
||
Line 31: | Line 31: | ||
) | ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
This is an example of what it should look like: | |||
[[File:InspectReturn.png|frame|none]] | |||
</section> | </section> | ||
==See Also== | ==See Also== | ||
{{Utility functions}} | {{Utility functions}} |
Revision as of 19:52, 17 December 2016
This function returns human-readable representations of tables and MTA datatypes as a string.
Syntax
string inspect ( mixed var )
Required Arguments
- var: A variable of any datatype.
Returns
Always returns a string.
Example
Click to collapse [-]
ClientThis example draws the contents of a table and its data type:
local Table = { ["matrix"] = {position = {getElementPosition(localPlayer)},rotation = {getElementRotation( localPlayer )}}, ["localplayer"] = getPlayerName(localPlayer), } addEventHandler("onClientRender",root, function( ) dxDrawText(inspect(Table),10,250) end )
This is an example of what it should look like:
See Also
- addDebugHook
- base64Decode
- base64Encode
- debugSleep
- decodeString
- encodeString
- fromJSON
- generateKeyPair
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getTickCount
- getTimerDetails
- getTimers
- getFPSLimit
- getUserdataType
- getVersion
- gettok
- isTransferBoxVisible
- setTransferBoxVisible
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setDevelopmentMode
- setFPSLimit
- setTimer
- ref
- deref
- sha256
- split
- teaDecode
- teaEncode
- toJSON
- tocolor
- getProcessMemoryStats
- utfChar
- utfCode
- utfLen
- utfSeek
- utfSub
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace