Here are some general guide lines that will make your development of scripts faster and more stable.
Read this guide on Script Expressions to start with:
Write down all Use Cases you want your script to support. Write down each case step by step. Once you have developed your script, make sure you test all Use Cases.
Create a test application. Always make your development in a separate test application and not in the customer application. The test application can also be on a different server.
Use the Test Script function you have in the editor to test your script. You can set variable and trackPoint inputs in the editor. Geofences, POIs Custom Fields etc. will be taken from the selected user.
Use the log() function to log to the Terminal or the App Console.
App Console: http://gpsgate.com/blogComment/app_console
How to use SimOne to test Event Rules http://forum.gpsgate.com/topic.asp?TOPIC_ID=14038
Export the Event Rule from the test application and import it into the customer application when you are finished with development and testing.
How to: http://gpsgate.com/blogComment/export_and_import_event_rules_and_geofences
Here is a list of script samples (we will add more over time):
Sample: Inside POI http://forum.gpsgate.com/topic.asp?TOPIC_ID=18314
Sample: Geofence rule that checks if a vehcile is inside a geofence named by a custom field. http://forum.gpsgate.com/topic.asp?TOPIC_ID=18302
Sample: Script Expression example for daily odometer interval. http://forum.gpsgate.com/topic.asp?TOPIC_ID=17792
Guide: Multiple events per event rule and device. Set Notifier variables from script. http://forum.gpsgate.com/topic.asp?TOPIC_ID=17167
Guide: Allow users to select Event Rules using Custom Fields with scripting http://gpsgate.com/blogComment/allow_users_to_select_event_rules_using_custom_fields_with_scripting
Guide: Notifier variables: http://forum.gpsgate.com/topic.asp?TOPIC_ID=18301
Guide: Trip and Idle and Parking report using event rule http://gpsgate.com/blogComment/trip_and_idle_and_parking_report_using_event_rule
Guide: Trip and Idle in Event Rule Reports http://gpsgate.com/blogComment/trip_and_idle_data_in_event_rule_reports
Guide: Driver Login Report http://gpsgate.com/blogComment/999
Sample: 5 km gap without position updates http://forum.gpsgate.com/topic.asp?TOPIC_ID=18335
Sample: Distance between POIs (customer sites) http://forum.gpsgate.com/topic.asp?TOPIC_ID=18588