So, I've been thinking of learning to write challenge checker scripts for a variety of reasons.
I decided that I'd start with something that was already created, specifically the quadrangle script that is used for Delorme Challenge Checkers.
I copied the Virginia one exactly, and created a new script with the code. Even though the code is exactly the same, I get an error on mine seemingly indicating that there's a problem with the arguments. I get the following error.
[string ""]:83: bad argument #1 to 'pairs' (table expected, got boolean)
Is there someone willing to get me past this basic initial hurdle, so that I can play around and see what's possible?
There are two ‘parts’ to a checker - the actual script, and the configuration. The script is the code, and the configuration is the input variables to check, so that a new script doesn’t need to be written for each individual checker. For example, there are two challenges, Find 100 caches, and Find 250 caches. They would likely both use the same script, but you would change the configuration to make it work for that cache.
I think what you have done, looking at your script and tag, you have copied the script for lillfiluren’s Generic Poly Checker, which is used for a lot of different polygon checkers, and havent used any configuration tag. If you use the following tag used in the original checker, it should be identical to the Virginia DeLorme Checker:
That was it. I think I can start playing now. Sometimes, just getting beyond the initial basic concepts is the most difficult part. I totally ignored the "Tags" section, thinking that it was "Tags" similar to adding search tags. I understand that it is now essentially the initialization parameters.
One thing to be aware of is that most of the configurations for that Generic Poly Checker script are too big for the tag size limit, so the actual polygons have been uploaded onto the server. "polyset": "Delorme_VA" refers to one such uploaded polygon set.
And, as DrAcorn said, most challenges can be done with tags on an existing script. Script writing is more for if you have an unusual set of conditions. Before writing a new script, it's good to try "Find scripts" and see if there's one you can tag.