Help with code for URL paramaters

You can’t call a local function from the global scope, so either declare the function in the global scope, or call call it from the same local scope.