ID:150181
 
proc/NumToCode(N)
var/myText = num2text(N)

while(length(myText) < 6) myText = "0" + myText

#ifdef(DEBUG)
world << "value is [myText]"
#endif

return myText


This code gives me these errors when I compile:

ContentManager.dm:8:invalid macro name
ContentManager.dm:8:unexpected trailing text: '(DEBUG)'

What am I doing wrong?
Gughunter wrote:

#ifdef(DEBUG)
world << "value is [myText]"
#endif

Get rid of the () around (DEBUG), and it should work. The alternate notations are:
#ifdef DEBUG

or

#if defined(DEBUG)
In response to Tom