ID:1573435
 
(See the best response by Ter13.)
Code:
proc/paddedText(var/initial="", var/padto=4, var/padwith="0")
return ""

mob/verb/paddedText()
src << paddedText("50",4,"0")


Problem description:
There isn't even a loop here, and I keep getting:

runtime error: Maximum recursion level reached (perhaps there is an infinite loop)
To avoid this safety check, set world.loop_checks=0.
verb name: paddedText (/mob/verb/paddedText)
usr: Guest-3903360465 (/mob)
src: Guest-3903360465 (/mob)
call stack:
Guest-3903360465 (/mob): paddedText(50, 4, "0")
Guest-3903360465 (/mob): paddedText(50, 4, "0")
Guest-3903360465 (/mob): paddedText(50, 4, "0")


I have even made a new, completely blank project, to try it out, and stripped down EVERYTHING in the entirety of the verb, and still causing a loop.

Am I missing something big here? :/

Edit: Using the latest beta at the moment, in case earlier versions don't do the same thing. (Shouldn't matter though)

Best response
You have two identically named functions. There's no namespace label on your call to differentiate them. One is in the global namespace, and one is in the src namespace.

By default, paddedText() is calling from the src namespace, which is resulting in an infinite recursion.

Simple fix:

proc/paddedText(var/initial="", var/padto=4, var/padwith="0")
return ""

mob/verb/paddedText()
src << global.paddedText("50",4,"0")
WOW =.= I feel dumb. Thanks Ter.

Ter to save the day again.. again.