Author Topic: Convert a tagged string to a string? [Self-Solved..]  (Read 787 times)

Is there anyway to convert a tagged string to a string? Example:

This is the closest I have gotten.


Regular messages are regular messages.
« Last Edit: August 04, 2014, 05:43:43 PM by Advanced Bot »

Try getTaggedString(%tag)

Tried that, and it gives a blank message for some reason.

Tried that, and it gives a blank message for some reason.
Are you sure you're giving it a tagged string?

What are you calling it with?

Are you sure you're giving it a tagged string?

What are you calling it with?
This
post the code

Here is a package for part of the slayer code.

function Slayer_MinigameSO::messageAll(%this, %cmd, %msg, %a, %b, %c, %d, %e, %f, %g, %h, %i, %j, %k, %l, %m, %n, %o, %p, %q)
   {
      %m = getTaggedString(%msg);
      if(trim(%m) !$= "")
         %m = %msg;
      //%m = strReplace(%m, "%1", %a);
      //%m = strReplace(%m, "%2", %b);
      //%m = strReplace(%m, "%3", %c);
      //%m = strReplace(%m, "%4", %d);
      //%m = strReplace(%m, "%5", %e);
      //%m = strReplace(%m, "%6", %f);
      //%m = strReplace(%m, "%7", %g);
      //%m = strReplace(%m, "%8", %h);
      //%m = strReplace(%m, "%9", %i);
      for(%i=0;%i<clientGroup.getCount();%i++)
      {
         %cl = clientGroup.getObject(%i);
         if(%cl.isAdmin && %cl.minigameLLevel >= 2 && !isObject(%cl.minigame))
            messageClient(%cl, %cmd, "\c6(\c4" @ %this.title @ "\c6) \c0" @ %m);
      }
      return Parent::messageAll(%this, %cmd, %msg, %a, %b, %c, %d, %e, %f, %g, %h, %i, %j, %k, %l, %m, %n, %o, %p, %q);
   }

Here is a package for part of the slayer code.


      %m = getTaggedString(%msg);
      if(trim(%m) !$= "")
         %m = %msg;

Oh wow, found the issue... That was the only issue. Once that was removed I can see everything again.

What are you trying to do?

What are you trying to do?
It is supposed to listen to a mini game when out of a minigame. It works fine now.