Changes between Version 7 and Version 8 of Logging
- Timestamp:
- Feb 10, 2023, 5:54:44 AM (6 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Logging
v7 v8 42 42 ||`error` || Y || Y - red text || Y || Y || Y || N || 43 43 44 [[Debugging#Debuggingscripterrors|Debug]] by inserting logging functions. 45 {{{#!sh 46 # Most commonly used debug messages 44 47 45 {{{#!sh 48 # Print an unknown variable 49 warn(uneval(arg)) 50 46 51 # Print a debug message with several arguments. 47 warn(uneval(['string', arg1, arg2])) 52 warn(uneval([arg1, arg2])) 53 54 # Similar to uneval, but it does not show functions in that object 55 warn(JSON.stringify(object)) 56 57 # Create a stack trace of the JavaScript call stack at the moment that the Error object was created. 58 warn(new Error().stack) 59 60 # Petra AI: automatically uneval and include the player ID 61 API3.warn(arg) 48 62 }}} 49 63