"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[2133],{8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>i});var l=s(6540);const t={},r=l.createContext(t);function c(e){const n=l.useContext(r);return l.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),l.createElement(r.Provider,{value:n},e.children)}},8628:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>u,frontMatter:()=>c,metadata:()=>l,toc:()=>o});const l=JSON.parse('{"id":"XXTLanControl.lua/assist/cancel","title":"\u64a4\u9500\u6307\u5b9a\u8bf7\u6c42 (LCC.assist.cancel)","description":"\u58f0\u660e","source":"@site/docs/XXTLanControl.lua/assist/cancel.md","sourceDirName":"XXTLanControl.lua/assist","slug":"/XXTLanControl.lua/assist/cancel","permalink":"/docs/XXTLanControl.lua/assist/cancel","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":70,"frontMatter":{"sidebar_position":70},"sidebar":"tutorialSidebar","previous":{"title":"\u8bf7\u6c42\u4eba\u5de5\u8fdc\u63a7 (LCC.assist.request_control)","permalink":"/docs/XXTLanControl.lua/assist/request_control"},"next":{"title":"\u64a4\u9500\u5f53\u524d\u811a\u672c\u8bf7\u6c42 (LCC.assist.cancel_all)","permalink":"/docs/XXTLanControl.lua/assist/cancel_all"}}');var t=s(4848),r=s(8453);const c={sidebar_position:70},i="\u64a4\u9500\u6307\u5b9a\u8bf7\u6c42 (LCC.assist.cancel)",a={},o=[{value:"\u58f0\u660e",id:"\u58f0\u660e",level:2},{value:"\u53c2\u6570",id:"\u53c2\u6570",level:2},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c",level:2},{value:"\u8bf4\u660e",id:"\u8bf4\u660e",level:2},{value:"\u793a\u4f8b",id:"\u793a\u4f8b",level:2}];function d(e){const n={blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"\u64a4\u9500\u6307\u5b9a\u8bf7\u6c42-lccassistcancel",children:"\u64a4\u9500\u6307\u5b9a\u8bf7\u6c42 (LCC.assist.cancel)"})}),"\n",(0,t.jsx)(n.h2,{id:"\u58f0\u660e",children:"\u58f0\u660e"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-lua",children:"ok, err, task = LCC.assist.cancel(id, timeout?)\n"})}),"\n",(0,t.jsx)(n.h2,{id:"\u53c2\u6570",children:"\u53c2\u6570"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["id",(0,t.jsx)(n.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\uff0c\u8f85\u52a9\u8bf7\u6c42 ID\u3002"]}),"\n",(0,t.jsxs)(n.li,{children:["timeout",(0,t.jsx)(n.br,{}),"\n","\u6570\u503c\u578b\uff0c\u53ef\u9009\uff1b\u64a4\u9500\u8bf7\u6c42\u8d85\u65f6\u65f6\u95f4\uff08\u79d2\uff09\uff0c\u9ed8\u8ba4 ",(0,t.jsx)(n.code,{children:"10"}),"\u3002"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"\u8fd4\u56de\u503c",children:"\u8fd4\u56de\u503c"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["ok",(0,t.jsx)(n.br,{}),"\n","\u5e03\u5c14\u578b\uff0c\u64a4\u9500\u6210\u529f\u8fd4\u56de ",(0,t.jsx)(n.code,{children:"true"}),"\uff0c\u5931\u8d25\u8fd4\u56de ",(0,t.jsx)(n.code,{children:"false"}),"\u3002"]}),"\n",(0,t.jsxs)(n.li,{children:["err",(0,t.jsx)(n.br,{}),"\n","\u5b57\u7b26\u4e32\u578b\u6216 ",(0,t.jsx)(n.code,{children:"nil"}),"\uff1b\u5931\u8d25\u65f6\u8fd4\u56de\u9519\u8bef\u63cf\u8ff0\u3002"]}),"\n",(0,t.jsxs)(n.li,{children:["task",(0,t.jsx)(n.br,{}),"\n","\u8868\u7c7b\u578b\u6216 ",(0,t.jsx)(n.code,{children:"nil"}),"\uff1b\u64a4\u9500\u540e\u7684\u4efb\u52a1\u5bf9\u8c61\u3002"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"\u8bf4\u660e",children:"\u8bf4\u660e"}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsxs)(n.p,{children:["\u64a4\u9500\u4e00\u4e2a\u4ecd\u672a\u5b8c\u6210\u7684\u4eba\u5de5\u8f85\u52a9\u8bf7\u6c42\u3002",(0,t.jsx)(n.br,{}),"\n","\u8c03\u7528\u540e\uff0c\u8be5\u8bf7\u6c42\u4f1a\u4ece\u5f53\u524d\u811a\u672c\u7684\u672a\u5b8c\u6210\u8bf7\u6c42\u96c6\u5408\u4e2d\u79fb\u9664\u3002"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"\u793a\u4f8b",children:"\u793a\u4f8b"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-lua",children:'local ok, err, task = LCC.assist.cancel(taskId)\nif not ok then\n    nLog("\u64a4\u9500\u8f85\u52a9\u8bf7\u6c42\u5931\u8d25", err)\nend\n'})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}}}]);