Well chdk clearly doesn't think it's *.lua, because it's feeding your script to ubasic. That's an ubasic error which should never appear if the script was being fed to Lua.
Look at the file with CHDK file browser to see what CHDK thinks about the filename.
a570 is vxworks and can take long filenames, but I'd avoid spaces and other weird characters (anything other than a-z, A-Z, 0-9, _, - and that one dot) in filenames. And if you wish to keep portability with dryos cams, stick to 8.3 convention.