I worry that the Using AppleScript to Get and Set Keyboard Maestro Variables page is a bit too Donald Knuth for my intellect. Either way, I think the page would be improved by the inclusion of some really simple examples.
I also agree with this post about the need to spell out that quotation marks have to be placed around KM variable names in Applescripts.