Raised This Month: $51 Target: $400
 12% 

Good programming habits


Post New Thread Reply   
 
Thread Tools Display Modes
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 10-04-2004 , 20:40  
Reply With Quote #11

Bah
I indent.. my variable names make sense..to me
Its much more fun if you have to look at your code and go "WTF does that do?" (I've done that several times)

Once you get in the habit of indenting code, you will never leave it (I find myself indenting html..)
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 10-26-2004 , 14:56  
Reply With Quote #12

Yea I think I'm the WORST person when it comes to conforming to a code style.

No one in these forums can beat me, I change my mind on comformity about everyday.

GREAT sticky btw

Edit:

Quote:
There is one minor problem with combining files, though, and that is the inaccurate display of runtime errors (if they exist). If your script is made up of 5 files, and in the 5th file there is a runtime on line 10, AMXX will report your error on line 10, even if there are 500 lines of code in file 4 alone.
Perhaps you should mention amxx's nice debugging features. It will tell you the correct line number and which file it came from.
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 02-22-2005 , 13:40  
Reply With Quote #13

Yeah. Thanks Alot For This Tutorial Type Thing It Actually Got Me Indenting Alot More Thanks!



Freecode directed me here

GJ!
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
romiir
Junior Member
Join Date: Jul 2005
Old 07-24-2005 , 22:54  
Reply With Quote #14

Quote:
Originally Posted by devicenull
Bah
I indent.. my variable names make sense..to me
Its much more fun if you have to look at your code and go "WTF does that do?" (I've done that several times)

Once you get in the habit of indenting code, you will never leave it (I find myself indenting html..)
Ya, indenting is how I make my code pretty, in many languages, I am new to small, but I think my first plugin is quite clean and pretty
romiir is offline
scriptyboy
BANNED
Join Date: Sep 2005
Old 09-20-2005 , 21:42   semicolons
Reply With Quote #15

Can you end every single line with a semi-colon or are there certain lines that you cant use a semicolon with?
scriptyboy is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-20-2005 , 21:43  
Reply With Quote #16

dont use semi-colons at the end of:
if/else statements
do/while loops
for loops
Rule of thumb dont use ; with { or }
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
scriptyboy
BANNED
Join Date: Sep 2005
Old 09-20-2005 , 21:58   code
Reply With Quote #17

ok thanks...as you know im a newbie scriptor...so i need all the help i can get...oh, do you know if there is a list somewhere of the most comon used scripting notation along with what that piece of code does???That would really help.
scriptyboy is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-20-2005 , 22:09  
Reply With Quote #18

Nope.
Your two (2) new best friends.
http://amxmodx.org/doc/
http://amxmodx.org/funcwiki.php
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
scriptyboy
BANNED
Join Date: Sep 2005
Old 09-20-2005 , 22:16  
Reply With Quote #19

Quote:
Originally Posted by Suicid3
Nope.
Your two (2) new best friends.
http://amxmodx.org/doc/
http://amxmodx.org/funcwiki.php

OOOOO...I love my 2 new best friends...wait are you saying your not my 3rd?
scriptyboy is offline
aossos
New Member
Join Date: Sep 2005
Old 09-21-2005 , 04:38   help with indentation
Reply With Quote #20

I have heard that most scripter/coders use and indent of 4 characters. Unfortunatly I don't know how to change the settings so that I use that size indent. Can someone tell me how this is done?

Thank you
aossos is offline
Send a message via AIM to aossos
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 17:52.


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