added some combat safeties and updated comments in scripts
no idea what this LUA_ERRMEM error is