AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Loose indentation *fix (https://forums.alliedmods.net/showthread.php?t=108056)

Amonel 11-01-2009 07:25

Loose indentation *fix
 
PHP Code:

public test(idlvlcid)
{
    if(!
cmd_access(idlvlcid1))
            return 
PLUGIN_HANDLED;
  
            static 
name[32]
            
get_user_name(idname31);
            
client_print(0print_chat"blabla %s"name)


return 
PLUGIN_HANDLED;


i get one at line with 'static name[32]'

can anyone EXPLAIN me, why do i get it ?

Arkshine 11-01-2009 08:30

Re: Loose indentation *fix
 
Because it's not well aligned :

Code:
public test(id, lvl, cid) {     if ( !cmd_access( id, lvl, cid, 1 ) )     {         return PLUGIN_HANDLED;     }       new name[ 32 ]     get_user_name( id, name, 31 );     client_print( 0, print_chat, "blabla %s", name );         return PLUGIN_HANDLED; }

unnyquee 11-01-2009 08:32

Re: Loose indentation *fix
 
Do what Arkshine said and one more thing:
- Go to AMXx Studio, open your .sma, select "Tools" menu and click on "Indenter" :)
After that, save and you're done!

Doc-Holiday 11-01-2009 16:41

Re: Loose indentation *fix
 
Quote:

Originally Posted by unnyquee (Post 977841)
Do what Arkshine said and one more thing:
- Go to AMXx Studio, open your .sma, select "Tools" menu and click on "Indenter" :)
After that, save and you're done!


pawn studio works better

hleV 11-01-2009 17:44

Re: Loose indentation *fix
 
Notepad++ works the best.

Doc-Holiday 11-01-2009 18:23

Re: Loose indentation *fix
 
Quote:

Originally Posted by hleV (Post 978283)
Notepad++ works the best.


Only if your HleV

fysiks 11-01-2009 18:44

Re: Loose indentation *fix
 
Quote:

Originally Posted by hleV (Post 978283)
Notepad++ works the best.

Quote:

Originally Posted by NcB_Sav (Post 978318)
Only if your HleV

And Fysiks!

Arkshine 11-01-2009 18:46

Re: Loose indentation *fix
 
And Arkshine!

Doc-Holiday 11-01-2009 19:00

Re: Loose indentation *fix
 
ok i loose but i like pawn studio..... lolz....


I like the colors. although i might give n++ i saw fysiks had abunch of stuff for amx and cstrike in there sig for it

Amonel 11-02-2009 05:54

Re: Loose indentation *fix
 
what's the diference between static name and new name ?


All times are GMT -4. The time now is 17:46.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.