| Blockland Forums > Modification Help |
| strReplace not working more than once |
| (1/1) |
| Ipquarx:
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! |
| Iban:
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. |
| Ipquarx:
*facepalm* thats what the problem was, i forgot to put %string = thanks, locking topic. |
| Navigation |
| Message Index |