SA-MP Forums Archive
Fix tabsizes - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Fix tabsizes (/showthread.php?tid=372851)



Fix tabsizes - ikkentim - 28.08.2012

Hi.
I am lazy.

I have a big piece of code, and ever since I have been working on it, I messed up Tab's and such.

I do use #pragma tabsize 0 , But is there an application which fixes the tab-layout *which isn't a virus, scam or steals your code* ?


Re: Fix tabsizes - Cjgogo - 28.08.2012

As far as I am concerned,there's none,I think that's actully every programmer's dream...AND if there really isn't one,we programmers will end up by scripting one


Re: Fix tabsizes - HuSs3n - 28.08.2012

try this
http://boylett.com/scripts/autoindent.php


Re: Fix tabsizes - ikkentim - 28.08.2012

It works quite good, except for
pawn Код:
if(coding_is_awesome==1)
      return 1;
Thanks though


Re: Fix tabsizes - HuSs3n - 28.08.2012

well , i dont know if you can trust xD

but i tested it
pawn Код:
public Hi()
{
  HI
      HU
}
and it gave me
pawn Код:
public Hi()
{
  HI
  HU
}
but if you use { } for color embedding it might fuck up your code


Re: Fix tabsizes - Cjgogo - 28.08.2012

Quote:
Originally Posted by HuSs3n
Посмотреть сообщение
May be nice but look what it did to a piece of my code lol
pawn Код:
]   ",COLOR_FORESTGREEN,-1605.60, 711.86, 13.81,30.0,0,0);
    ezip = CreatePickup(1272,1,-1883.24, 865.67, 35.11,0);
    Create3DTextLabel("

    {
        San Fierro ZIP
    }
    ",COLOR_FORESTGREEN,-1883.24, 865.67, 35.11,30.0,0,0);
    ercs = CreatePickup(1272,1,-2243.19, 128.61, 35.48,0);
    Create3DTextLabel("

    {
        SF RC Electronics
    }



Re: Fix tabsizes - RoboN1X - 28.08.2012

i use this for my script, and it works ok, im sure its safe

BTW: save as another file then compiles it, after pasting from the tool (to prevent errors?)

just saying, not forcing you to use that


Re: Fix tabsizes - HuSs3n - 28.08.2012

Quote:
Originally Posted by Robo_N1X
Посмотреть сообщение
i use this for my script, and it works ok, im sure its safe

BTW: save as another file then compiles it, after pasting from the tool (to prevent errors?)

just saying, not forcing you to use that
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

how do you use it


Re: Fix tabsizes - MP2 - 28.08.2012

Learn how to indent then, it's not rocket science. You put the cursor at the start of the line and press TAB. Each new block should be indented another level, pretend it's like a basket, the opening and closing brackets (braces) hold your code in one level.