iprint
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function intelligently outputs debug messages into the Debug Console. It is similar to outputDebugString, but outputs useful information for any variable type, and does not require use of Lua's tostring. This includes information about element types, and table structures. It is especially useful for quick debug tasks.
Syntax
bool iprint ( mixed var1, mixed var2, mixed var3... )Required Arguments
- var1: A variable of any type to print intelligent information for.
- var2: MISSING_PARAM_DESC
- var3...: MISSING_PARAM_DESC
Returns
- bool: value
Always returns nil .
Code Examples
shared
This example prints some sample debug messages, assuming the server is running a typical freeroam/play environment:
function resourceStartNotify ( resourcename ) -- Example of outputting tables, and elements directly iprint(getElementsByType("player")) iprint(getElementsByType("vehicle")) -- Example of outputting multiple items at once iprint("this resource:",getThisResource(),"state:",getResourceState(getThisResource()),"resource root:",getResourceRootElement(getThisResource()))endaddEventHandler( "onResourceStart", getRootElement(), resourceStartNotify )See Also
Utility Functions
- addDebugHook
- bitAnd
- bitArShift
- bitExtract
- bitLRotate
- bitLShift
- bitNot
- bitOr
- bitReplace
- bitRRotate
- bitRShift
- bitTest
- bitXor
- createTrayNotification
- debugSleep
- decodeString
- deref
- downloadFile
- encodeString
- fromJSON
- generateKeyPair
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getFPSLimit
- getKeyboardLayout
- getLocalization
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getProcessMemoryStats
- getRealTime
- getServerIp
- getTickCount
- getTimerDetails
- getTimers
- gettok
- getUserdataType
- getVersion
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isShowCollisionsEnabled
- isShowSoundEnabled
- isTimer
- isTimerPaused
- isTransferBoxAlwaysVisible
- isTransferBoxVisible
- isTrayNotificationEnabled
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- ref
- removeDebugHook
- resetTimer
- setClipboard
- setDevelopmentMode
- setFPSLimit
- setTimer
- setTimerPaused
- setTransferBoxVisible
- setWindowFlashing
- sha256
- showCol
- showSound
- split
- teaDecode
- teaEncode
- tocolor
- toJSON
- utfChar
- utfCode
- utfLen
- utfSeek
- utfSub