Help me please
#1

Hi,Is there anyway that I can find where i forgot to put a } because i worked like 1 mounth on a script and I forgot somewhere a } and it god like 90k lines and its imposible to find it,please i really need your help.
Reply
#2

Just back track what parts you worked on until you find the bit where you forgot to close the bracket.
Reply
#3

Indeed, I have it too at the moment ( My script has a size of 63+K lines ), but you just have to track back where it's comming from because there is no other way to find/solve it.

Best regards,
Jesse
Reply
#4

Use Notepad++ to find the key
Reply
#5

Quote:
Originally Posted by zbt
Посмотреть сообщение
Use Notepad++ to find the key
what you mean ?
Reply
#6

when you click a opening bracket in notepad++ it turns red along with its closing bracket

this might make it a little easier.
Reply
#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


Forum Jump:


Users browsing this thread: 4 Guest(s)