Lua错误问题

Lua错误问题,lua,Lua,嗨,我是lua的新手,我经常遇到脚本错误 错误是 67:预计在eof附近“结束”(关闭第38行的功能) 这里是代码,阿甘我在刘非常新的任何帮助将不胜感激 function c123456708.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(123456708,0)) e1:SetCategory(CATEGORY_SPEC

嗨,我是lua的新手,我经常遇到脚本错误 错误是

67:预计在eof附近“结束”(关闭第38行的功能)

这里是代码,阿甘我在刘非常新的任何帮助将不胜感激

 function c123456708.initial_effect(c)
    --special summon
local e1=Effect.CreateEffect(c)
    e1:SetDescription(aux.Stringid(123456708,0))
    e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
    e1:SetType(EFFECT_TYPE_IGNITION)
    e1:SetRange(LOCATION_HAND)
    e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
    e1:SetCost(c123456708.spcost)
    e1:SetTarget(c123456708.sptg)
    e1:SetOperation(c123456708.spop)
    c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
    e2:SetDescription(aux.Stringid(123456708,0))
    e2:SetCategory(CATEGORY_TOHAND)
    e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
    e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
    e2:SetCode(EVENT_SPSUMMON_SUCCESS)
    e2:SetCondition(c123456708.thcon)
    e2:SetTarget(c123456708.thtg)
    e2:SetOperation(c123456708.thop)
    c:RegisterEffect(e2)
end
  function c123456708.cfilter(c)
  return c:IsFaceup() and c:GetCode()==123456709
end
    function c123456708.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
    if chk==0 then return         Duel.CheckReleaseGroup(tp,c123456708.cfilter,1,nil) end
    local g=Duel.SelectReleaseGroup(tp,c123456708.cfilter,1,1,nil)
    Duel.Release(g,REASON_COST)
end
    function c123456708.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
    if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
        and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
    Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c123456708.spop(e,tp,eg,ep,ev,re,r,rp)
    if e:GetHandler():IsRelateToEffect(e) then
    Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
function c123456708.spcon(e,c)
    if c==nil then return true end
    local tp=c:GetControler()
    return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
        and Duel.IsExistingMatchingCard(c123456708.cfilter,tp,0,LOCATION_MZONE,1,nil)
end
function c123456708.thcon(e,tp,eg,ep,ev,re,r,rp)
    return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function c123456708.thfilter(c)
    return c:IsType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER) and c:IsAbleToHand(11)
end
function c123456708.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
    if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c123456708.thfilter(chkc) end
    if chk==0 then return true end
    Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
    local g=Duel.SelectTarget(tp,c123456708.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
    Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c123456708.thop(e,tp,eg,ep,ev,re,r,rp)
    local tc=Duel.GetFirstTarget()
    if tc and tc:IsRelateToEffect(e) then
        Duel.SendtoHand(tc,nil,REASON_EFFECT)
    end
end 
如果筛选起来很麻烦的话,我很抱歉

加上一个姐妹代码,我得到atempt索引全局c50140163零值 代码是

function c123456709.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c123456709.regop)
c:RegisterEffect(e1)
end
c123456709.lvupcount=1
c123456709.lvup={123456707}
c123456709.lvdncount=2
c123456709.lvdn={123456707,123456706}
function c123456709.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetSummonType()==SUMMON_TYPE_SPECIAL+1 then
    local e1=Effect.CreateEffect(c)
    e1:SetDescription(aux.Stringid(123456709,0))
    e1:SetCategory(CATEGORY_EQUIP)
    e1:SetType(EFFECT_TYPE_IGNITION)
    e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
    e1:SetRange(LOCATION_MZONE)
    e1:SetCountLimit(1)
    e1:SetCondition(c123456709.eqcon)
    e1:SetTarget(c123456709.eqtg)
    e1:SetOperation(c123456709.eqop)
    e1:SetReset(RESET_EVENT+0x1ff0000)
    e1:SetLabelObject(e)
    c:RegisterEffect(e1)
    end
  end
  function c123456709.eqcon(e,tp,eg,ep,ev,re,r,rp)
  local ec=e:GetLabelObject():GetLabelObject()
  return ec==nil or ec:GetFlagEffect(123456709)==0
  end
  function c123456709.filter(c)
  return c:IsAbleToChangeControler()
    end
  function c123456709.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
 if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-   tp) and c123456709.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
    and Duel.IsExistingTarget(c123456709.filter,tp,0,LOCATION_MZONE,1,nil)             end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c123456709.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c123456709.eqlimit(e,c)
return e:GetOwner()==c and not c:IsDisabled()
end
function c123456709.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
    if c:IsFaceup() and c:IsRelateToEffect(e) then
        local atk=tc:GetTextAttack()
        local def=tc:GetTextDefence()
        if atk<0 then atk=0 end
        if def<0 then def=0 end
        if not Duel.Equip(tp,tc,c,false) then return end
        --Add Equip limit
        tc:RegisterFlagEffect(123456709,RESET_EVENT+0x1fe0000,0,0)
        e:GetLabelObject():SetLabelObject(tc)
        local e1=Effect.CreateEffect(c)
        e1:SetType(EFFECT_TYPE_SINGLE)
        e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
        e1:SetCode(EFFECT_EQUIP_LIMIT)
        e1:SetReset(RESET_EVENT+0x1fe0000)
        e1:SetValue(c123456709.eqlimit)
        tc:RegisterEffect(e1)
        local e2=Effect.CreateEffect(c)
        e2:SetType(EFFECT_TYPE_EQUIP)
              e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SE T_AVAILABLE)
        e2:SetCode(EFFECT_DESTROY_SUBSTITUTE)
        e2:SetReset(RESET_EVENT+0x1fe0000)
        e2:SetValue(c123456709.repval)
        tc:RegisterEffect(e2)
    else Duel.SendtoGrave(tc,REASON_EFFECT) end
  end
  end
 function c123456709.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
功能c123456709.初始效应(c)
--装备
局部e1=效果。CreateEffect(c)
e1:SetType(效果类型单一+效果类型连续)
e1:设置代码(事件成功)
e1:SetOperation(c123456709.regop)
c:注册表效应(e1)
终止
c123456709.lvupcount=1
c123456709.lvup={123456707}
c123456709。lvdncount=2
c123456709.lvdn={123456707123456706}
函数c123456709.regop(e、tp、eg、ep、ev、re、r、rp)
本地c=e:GetHandler()
如果c:getCallockType()==CallockType\uSpecial+1,则
局部e1=效果。CreateEffect(c)
e1:SetDescription(辅助字符串ID(123456709,0))
e1:设置类别(设备类别)
e1:SetType(效果类型点火)
e1:SetProperty(效果\标志\卡\目标)
e1:设置范围(位置区域)
e1:SetCountLimit(1)
e1:设置条件(c123456709.eqcon)
e1:SetTarget(c123456709.eqtg)
e1:设置操作(c123456709.eqop)
e1:SetReset(复位事件+0x1ff0000)
e1:SetLabelObject(e)
c:注册表效应(e1)
终止
终止
功能c123456709.eqcon(e、tp、eg、ep、ev、re、r、rp)
本地ec=e:GetLabelObject():GetLabelObject()
返回ec==nil或ec:GetFlagEffect(123456709)==0
终止
函数c123456709.过滤器(c)
返回c:IsabletoChangeController()
终止
功能c123456709.设备(e、tp、eg、ep、ev、re、r、rp、chk、chkc)
如果为chkc,则返回chkc:IsLocation(位置\ MZONE)和chkc:IsControler(1-tp)和c123456709。过滤器(chkc)结束
如果chk==0,则返回Duel.GetLocationCount(tp,LOCATION_SZONE)>0
和Duel.IsExistingTarget(c123456709.过滤器,tp,0,位置区,1,nil)结束
决斗提示(提示选择MSG、tp、提示装备)
本地g=Duel。选择目标(tp,c123456709。过滤器,tp,0,位置区域,1,1,无)
决斗设置操作信息(0,装备类别,g,1,0,0)
终止
函数c123456709.eqlimit(e,c)
返回e:GetOwner()==c而不是c:IsDisabled()
终止
功能c123456709.eqop(e、tp、eg、ep、ev、re、r、rp)
本地c=e:GetHandler()
本地tc=Duel.GetFirstTarget()
如果tc:IsRelateToEffect(e),则
如果c:IsFaceup()和c:IsRelateToEffect(e),则
本地atk=tc:GetTextAttack()
本地def=tc:getTextDefense()

如果atk两个代码段都没有语法错误。它们都编译(并且不执行,因为我没有库),除了以下语句中的一个之外没有错误:

e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SE T_AVAILABLE)

T\u可用之前,您可能缺少一个逗号(

并且我得到了一个初始效果错误atemp来调用错误函数?我还得到了另一个与姐妹代码有关的错误代码,即atempt来索引全局c50140163 ni值。代码是