[Tool/Web/Other] Check the script for curly bracket mistakes (linux)
#1

Hello samp-forum community,

I had some problems with curly brackets in the past. I read it also very often already, that people had to deal with these problems already.

I just created a tool for finding these curly bracket mistakes and I also tested it. It was really annoying for me to find these curly bracket mistakes. I found them relatively quickly because I know what I have done before etc. but it's better and easier if I use my little tool.

Example code (with the known problem):
Code:
if(ianduisnotme == 1)
{
    put some code in here
}
}
Example code (without the known problem):
Code:
if(ianduisnotme == 1)
{
    put some code in here
}
Code:
Y_Less suggestion:
How does it deal with code like:

Code:

#if A
    Func(a) {
#else
    Func(b) {
#endif


    }
It also deals with this code.

It also tells you if there's a mistake; for instance:

Code:
#if A
    Func(a) {
#else
    Func(b) //Mistake is here
#endif


    }
or

Code:
#if A
    Func(a) {
#else
    Func(b) //Mistake is here, missing opening bracket
#endif

    //Mistake here also, missing closing bracket
Code:
#if A
    Func(a) //Mistake here, missing closing bracket
#else
    Func(b) //Mistake is here, missing closing bracket
#endif
}

    }
Use:
Code:
perl syncor.pl -f <file.pwn>


What doesn't do the script? It doesn't tell you the kind of mistake! It's simply unecessary for you because you know how to script pawno right ?

Have fun and enjoy the future without doing a long long search for the curly bracket mistake!

-Doddinger

PS. If you have any suggestions, simply write them down and reply here.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)