FAQ nse prereqs
From SecWiki
This NSE script I downloaded won't work.
NSE scripts often depend on Lua libraries and core Nmap capability that was added in a specific version of Nmap. For best results, use the scripts that came bundled with your version of Nmap. You can always upgrade to the latest version of Nmap.
If you got the script from another site, ask the author if it is meant for a specific version of Nmap.