Help me please
#7

Ok, I think that I made the solution in Javascript.

here we go;

upload your script in www.pastebin.com (do not forget to select UNLISTED and "expire in 10 minutes" in the options), after that, in the code's pastebin page, execute this script;

Код:
$ = document.getElementsByTagName("textarea")[0].innerHTML.match(/(stock|public) .*?\([\s\S]*?\n}/gim);
o = "";
for(x in $) {
    u = $[x].match(/(stock|public) (.*?)\([\s\S]*?\n}/im);
    c1 = u[0].match(/\{/g).length;
    c2 = u[0].match(/\}/g).length;
    
    if(c1 !== c2)
        o += u[2] + "\n";
}

alert("There are '}' missing in the following functions:\n\n" + o);
To execute it in the browser just type ctrl + shift + K and paste the code on the command line (if you are using firefox).



I've tested it on this page:
http://pastebin.com/tjyPBqpL


and the code works fine, but you will have issues if you have two consecutives commands with a "}" missing, so after fix a bracket missing, execute the code again and again until it gets no errors.

also this code checks only for stock's and public's commands, I can change it to work with zCMDs and stuff.
Reply


Messages In This Thread
Help me please - by StyleR - 23.05.2012, 13:00
Re: Help me please - by miokie - 23.05.2012, 13:07
Re: Help me please - by jessejanssen - 23.05.2012, 13:10
Re: Help me please - by zbt - 23.05.2012, 13:10
Re: Help me please - by StyleR - 23.05.2012, 13:12
Re: Help me please - by Jonny5 - 23.05.2012, 13:48
Re: Help me please - by Mandrakke - 23.05.2012, 13:50

Forum Jump:


Users browsing this thread: 2 Guest(s)