Mercurial > hg > batmud > gmap2
changeset 85:c9a78b6a212b gmap2
Check if certain variables are set.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 16 Oct 2011 01:27:33 +0300 |
parents | c3cd3bfb7a77 |
children | 2ea7fe9f9c1d |
files | tools/makegmaps.php |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/makegmaps.php Sun Oct 16 01:07:18 2011 +0300 +++ b/tools/makegmaps.php Sun Oct 16 01:27:33 2011 +0300 @@ -344,6 +344,9 @@ /* * Export tradelane data to XML */ +if (!isset($tradelanePoints)) + die("PHP array \$tradelanePoints not set, '$config' is old or incompatible.\n"); + echo "\nCreating tradelane waypoint data '".$tradelaneOutXML."' ...\n"; $doc = new DOMDocument("1.0", "UTF-8"); $node = $doc->createElement("markers"); @@ -372,6 +375,10 @@ $doc = new DOMDocument("1.0", "UTF-8"); $node = $doc->createElement("tradelanes"); $parnode = $doc->appendChild($node); + +if (!isset($tradelaneDefs)) + die("PHP array \$tradelaneDefs not set, '$config' is old or incompatible.\n"); + foreach ($tradelaneDefs as $index => $points) { $node = $doc->createElement("line");