Raised This Month: $ Target: $400
 0% 

Ideas to make your coding experience easier


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
^BuGs^
Senior Member
Join Date: May 2007
Old 08-12-2007 , 23:06   Ideas to make your coding experience easier
Reply With Quote #1

I been witnessing lots of people doing the same thing so I compiling a bunch of tips.
  1. Before starting a project:
    1. Decide what you are really going to do. (Game play, administration, fun, etc.)
    2. Decide how you are going to do it.
    3. Make sure you can handle that project.
  2. Be sure that you are using latest versions. (MM:S, SM and API's you use.)
  3. Always make a "To Do" list and a change log to keep your project organized.
  4. Check to see if something your about to code in your script is already being done by another plugin with their API. (Don't reinvent the wheel.)
    1. Reason: Less Memory Usage
    2. Example: Repeated messages that go to all client to tell something (i.e. Type !yourtriggerhere to run me)
    3. Possible Solution: Use the Ads API. Allows better control flow of messages. (Shameless plug)
    4. Con: Online compiler will not work.
  5. Your plugin provide functionally that everyone could use... create an API with the needed natives. Bouns... make it so it's optional so you don't force the person using your plugin, also have to use the secondary plugin just so they can disable it once it's running.
  6. Highly recommend using http://sm.nican132.com/ for fast looking up of function definitions.
  7. Do not hardcode values. Use Cvars or a configuration file.
  8. Tell users your project's compatibilities/dependencies. (OS, mod, extensions, plugins, APIs)
  9. Don't wait for a request to put screenshots. You can use Picasa Web to organize your screenshots easily.
  10. Do not create your own "MAX CLIENTS" define. Use MAXPLAYERS. If this is going to be an array, do not forget the "+ 1". Client Index start 1 -- not 0.(Hint for people who want their plugins approved.)
  11. Post your suggestion!
__________________
Sourcemod Plugin Author and Plugin Approver
"The correct way is MAXPLAYERS + 1"
I will not take bugs/new idea reports over the forums. Please use the issue list.

Last edited by ^BuGs^; 08-14-2007 at 09:08.
^BuGs^ is offline
 



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 22:05.


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