Author Topic: CenterPrint NewLine  (Read 773 times)

I am trying to make a way to seperate lines in centerPrint through events. Here's what I have:
Code: [Select]
package NewLine
{
   Function GameConnection::centerPrint(%client,%msg,%time)
   {
      if(striCmp(%msg,"<nl>"))
      {
         %msg = strReplace(%msg,"<nl>","\t");
         if(getFieldCount(%msg) < 4)
         {
            for(%i=0;%i<getFieldCount(%msg);%i++)
            {
               %field = getField(%msg,%i);
               %msg = %msg NL %field;
            }
         }
      }
      Parent::CenterPrint(%client,%msg,%time);
   }
};
activatePackage(NewLine);
But that crashes me when I call the function. Any help?
Ha, mind blank, I can just use "\n"
« Last Edit: September 26, 2009, 02:48:40 PM by lilboarder32 »

<br> already exists and works in events without extra code.

<br> already exists and works in events without extra code.
Oh, didn't know that, thanks.

It is unnecessary to lock Coding Help posts as you have just proven. You locked it after thinking you had solved your problem, I unlocked it, and Space Guy then posted something you didn't know. You could have missed an opportunity to further your knowledge simply out of some silly habit. Lets stop.

Can you put something like that into a stickied topic? It'd really help this board. Or just disable the author locking since there's no real use for it.

It is unnecessary to lock Coding Help posts as you have just proven. You locked it after thinking you had solved your problem, I unlocked it, and Space Guy then posted something you didn't know. You could have missed an opportunity to further your knowledge simply out of some silly habit. Lets stop.
Gah, you're right. There should either be a sticky saying to not lock topics, or remove that function from this section. I'll try to stop locking my Coding Help topics.