Advanced

Re: My Generic County checker not working for one geocacher nickname

My Generic County checker not working for one geocacher nickname
August 17, 2016 10:10AM
Hello,

I'm trying to debug one of my largely popular script Generic County checker and run out of ideas with one problem.
Would you, please, help me?

Checker: GC6MK08/21726
Issue: Ends up with error on one particular geocacher - without any script output details.
Problematic geocacher: r2014
OK geocacher (for testing): QQI

This is only geocacher which I detected to be problematic.
I tried to remove region from variables: OK - works!
I tried to use different region of Switzerland in variables (not "Zug"): OK - works!
I tried to use all individual counties (11) from region "Zug": OK - script works for each individual county!
(User r2014 meets criteria for 10 counties of "Zug", does not meet for "Steinhausen" county.)

Don't know if this is related - but I noticed that on geocaching.com site is dispayed region "Zentralschweiz (ZG/SZ/LU/UR/OW/NW)", while in project-gc.com dropdowns are individual Kantons ("Zug", "Schwyz", "Luzern" etc).

Thank you for help!

Rikitan
Re: My Generic County checker not working for one geocacher nickname
August 17, 2016 12:29PM
I tested it now and it works.
I have not idea what the problem was
My best idea it that a county/region field was not populated and is now set.
Or you changed somting in the script
Re: My Generic County checker not working for one geocacher nickname
August 17, 2016 12:43PM
Humm .. I did not change anything in the script after I placed this question here.
And it is still not working to me. This is the outcome (both on Chrome and Firefox):

Re: My Generic County checker not working for one geocacher nickname
August 17, 2016 01:05PM
Upps I tested only the ok geocacher by mistake and will look at the prolme
Re: My Generic County checker not working for one geocacher nickname
August 17, 2016 01:35PM
The problem is the print on line 137
Adding a space before \n will create a working script. I have no ide why.
Print("gc ".. cache['gccode'].." county "..cache['county']..' visitdate: '..cache['visitdate'],"\n" )
Print("gc ".. cache['gccode'].." county "..cache['county']..' visitdate: '..cache['visitdate']," \n" )

If you add a return surrounded by a if you can run only parts of the script.
I was with that able to determine what code segement was the problem
And with adding comment -- line by line and finaly )-- to run part of the print I found the error
if true then
  return { ok = ok, log = false, html = false }
end

EDIT: BBcode is interprited inside CODE segment so extra space is before ) to remove smiley



Edited 2 time(s). Last edit at 08/17/2016 01:36PM by Target.. (view changes)
Re: My Generic County checker not working for one geocacher nickname
August 18, 2016 09:34AM
Another possibility would be if changing the comma before the "\n" to a double dot might work. I haven't tested this though.
Print("gc ".. cache['gccode'].." county "..cache['county']..' visitdate: '..cache['visitdate'],"\n" )
Print("gc ".. cache['gccode'].." county "..cache['county']..' visitdate: '..cache['visitdate'].."\n" )
Re: My Generic County checker not working for one geocacher nickname
August 17, 2016 02:05PM
Target - thank you! Your solution with additional space before /n works well (although I don't understand the driver of problem).
I rather disabled "Print" line in code - it is not necessary to have it in the output.

=== SOLVED ===
Sorry, you do not have permission to post/reply in this forum.