Author Topic: strReplace not working more than once  (Read 490 times)

I'm trying to make a script that takes a input, and replaces certain characters, and then returns the finished string. This involves more than 1 strreplace, but it's not seeming to work more than once. I've tried using separate functions, using different variable names, but it only seems to replace once.
Here's the code:

function NN(%Input)
{
    strreplace(%Input, ".", " ");
    strreplace(%input, "e", " ");
}

How do i fix this?
Replies appreciated!

function thinkClearly(%string)
{
   %string = strreplace(%string, "herp", "Thinking");
   %string = strreplace(%string, "derp", "Clearly");
   return %string;   
}


Does this:

==> echo(thinkClearly("I am herp derp."));
I am Thinking Clearly.

*facepalm* thats what the problem was, i forgot to put %string =
thanks, locking topic.