What's the best way to be pro in scripting?
#7

Be familiar with all language constructs; know when and how to use them. Be familiar with the game. Be familiar with the API. Over time you will learn to read color codes and interpret what they look like, or approximate a location on the map just by looking at some coordinates.

Most importantly, use a naming convention. Scripts that have apparently random variable and function names look unprofessional and are hard to debug.

In my case that is:
  • Constants are written in all caps with underscores.
  • Functions use PascalCase and contain a verb.
  • Variables use camelCase.
  • Normal variables are singular.
  • Arrays are plural.
  • Global variables are prefixed with 'g'.
  • Variables are meaningful and named for their purpose, not their type (e.g. "message" rather than "string").
  • SQL table names are singular and use PascalCase.
  • SQL field names are singular and use camelCase.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)