| Blockland Forums > Modification Help |
| Removing all tags |
| (1/4) > >> |
| Brian Smithers:
Well, I'm working on a script and it relies on removing all <> tags. Though I don't know how to do this. Help? |
| Brian Smithers:
function findNextTag(%string) { %start = strPos(%string,"<"); %end = strPos(%string,">"); return %start SPC %end; } function removeTags(%string) { while(findNextTag(%string) !$= "") { %tagpos = findNextTag(%string); %start = getWord(%tagpos,0); %end = getWord(%tagpos,1); %sut = getSubStr(%string,0,%start); %eut = getSubStr(%string,%end,strLen(%string)); %newstr = %sut @ %eut; } return %newstr; } this makes me crash anyone help? |
| Lugnut:
Why don't you just load the whole script or whatever as a variable, then do strReplace(%script, "<", "");strReplace(%script, ">", "");? |
| Brian Smithers:
--- Quote from: Lugnut1206 on March 02, 2012, 06:10:13 PM ---Why don't you just load the whole script or whatever as a variable, then do strReplace(%script, "<", "");strReplace(%script, ">", "");? --- End quote --- I have to remove the entire tag including the things inside. |
| Lugnut:
Oh. Aren't there wildcards in torque? is it absolutely neccesary to do this ingame? I know how to do it with Notepad++... |
| Navigation |
| Message Index |
| Next page |