Raised This Month: $ Target: $400
 0% 

Loose indentation *fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Amonel
Senior Member
Join Date: May 2009
Old 11-01-2009 , 07:25   Loose indentation *fix
Reply With Quote #1

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 ?

Last edited by Amonel; 11-01-2009 at 07:33.
Amonel is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-01-2009 , 08:30   Re: Loose indentation *fix
Reply With Quote #2

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; }
__________________
Arkshine is offline
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 11-01-2009 , 08:32   Re: Loose indentation *fix
Reply With Quote #3

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!
__________________
unnyquee is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-01-2009 , 16:41   Re: Loose indentation *fix
Reply With Quote #4

Quote:
Originally Posted by unnyquee View Post
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
Doc-Holiday is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 11-01-2009 , 17:44   Re: Loose indentation *fix
Reply With Quote #5

Notepad++ works the best.
__________________
hleV is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-01-2009 , 18:23   Re: Loose indentation *fix
Reply With Quote #6

Quote:
Originally Posted by hleV View Post
Notepad++ works the best.

Only if your HleV
Doc-Holiday is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-01-2009 , 18:44   Re: Loose indentation *fix
Reply With Quote #7

Quote:
Originally Posted by hleV View Post
Notepad++ works the best.
Quote:
Originally Posted by NcB_Sav View Post
Only if your HleV
And Fysiks!
__________________
fysiks is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-01-2009 , 18:46   Re: Loose indentation *fix
Reply With Quote #8

And Arkshine!
__________________
Arkshine is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-01-2009 , 19:00   Re: Loose indentation *fix
Reply With Quote #9

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
Doc-Holiday is offline
Amonel
Senior Member
Join Date: May 2009
Old 11-02-2009 , 05:54   Re: Loose indentation *fix
Reply With Quote #10

what's the diference between static name and new name ?
Amonel is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:19.


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