• Print

Author Topic: Interesting function... looked familiar  (Read 8 times)

0 Members and 1 Guest are viewing this topic.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Interesting function... looked familiar
« on: January 28, 2010, 07:19:23 pm »
ULib.debugFunctionCall - http://ulyssesmod.net/docs/files/lua/ULib/shared/messages-lua.html#debugFunctionCall
Does it show the 'names' of the parameters passed?


Saw this.. http://www.facepunch.com/showthread.php?t=884409
almost blurted out "ULib already does that!"
Then realized it doesn't seem to.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Interesting function... looked familiar
« Reply #1 on: January 28, 2010, 10:54:16 pm »
ULib.debugFunctionCall - http://ulyssesmod.net/docs/files/lua/ULib/shared/messages-lua.html#debugFunctionCall
Does it show the 'names' of the parameters passed?


Saw this.. http://www.facepunch.com/showthread.php?t=884409
almost blurted out "ULib already does that!"
Then realized it doesn't seem to.


It doesn't poke through the debug table or anything fancy like that, it's just used to help visualize what's passing into a function. It's useful since it's often difficult to tell exactly what values of what type you're passing into a function. A use would be like...
Code: Lua
  1. ULib.debugFunctionCall( "myBigComplicatedFunction", myIntArg, myStringArg, myBlahArg ) -- Prints the function name + detailed info about the arguments
  2. myBigComplicatedFunction( myIntArg, myStringArg, myBlahArg )
Experiencing God's grace one day at a time.

  • Print