I'm putting together a checklist of things to concider when writing scripts, to help remember all the possibilities and unusual situations that scripts need to be able to cope with. I figured others would find it useful, especially if they're thinking of trying to get their scripts signed.
It's a wiki style page where anyone can edit the contents, so if you see something I've missed you can add it yourself
It currently looks like this:
You can edit it hereScripting Checklist wrote: When writing scripts there are many things you need to keep in mind about how the script will interact with the X-Universe. It's not enough that the script functions properly in the ideal circumstances that it was designed for, it must also be able to cope with the unexpected.
It is the nature of the X-Universe that if there is the possibility of something happening it will happen to someone. Your scripts need to be abe to handle every possibility without causing a problem (ie. crashing)
The Following is a checklist of things that you should think about when writing your scripts:
General
-Always concider how the script will react if it is called by a foreign script by someone else. Will it cope if the parameters are screwed up, or missing?
Navigation
-Make sure you get there. All navigation commands are interuptable. If they get interupted by another script they will stop before they've reached their destination.
Using a while loop to make sure you've arrived is a good idea, but you need to watch out for potential problems with the target
--Can you actually get to that sector?
--Can you dock at that target?
--Does the target still exist, has it been destroyed?
--Has the target turned hostile, or was it supposed to be an enemy?
Trading
-Are you actually docked?
-Are you docked at the right place?
-Is the price still right?
-do you have enough money?
-can you carry that type of cargo?
-can you carry that much?