Marc
  • Marc
  • Advanced Member Topic Starter
2014-03-17T19:10:28Z
It says I have a error at line 16. Where Did I go wrong?

Number 26: Black Archer – Lord of Banishment
Rank 4 Dark Warrior 2600/2200
2 Level 4 monsters
Once per turn: You can detach 1 Xyz Material from this card; Banish 5 cards in either players Graveyard.
Quote:

--Number 26: Black Archer - Lord of Banishment
function c1026000000.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,4),2)
c:EnableReviveLimit()
--Remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c1026000000.cost)
e1:SetCode(EVENT_REMOVE)
e1:SetCountLimit(1)
e1:SetTarget(c1026000000.target)
e1:SetOperation(c1026000000.operation) (Line 16)
c:RegisterEffect(e1)
end
function c1026000000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)end
function c1026000000.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c1026000000.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end

urielkama
2014-03-17T19:23:06Z
Originally Posted by: Marc 

It says I have a error at line 16. Where Did I go wrong?

Number 26: Black Archer – Lord of Banishment
Rank 4 Dark Warrior 2600/2200
2 Level 4 monsters
Once per turn: You can detach 1 Xyz Material from this card; Banish 5 cards in either players Graveyard.

Quote:

--Number 26: Black Archer - Lord of Banishment
function c1026000000.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,4),2)
c:EnableReviveLimit()
--Remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c1026000000.cost)
e1:SetCode(EVENT_REMOVE)
e1:SetCountLimit(1)
e1:SetTarget(c1026000000.target)
e1:SetOperation(c1026000000.operation) (Line 16)
c:RegisterEffect(e1)
end
function c1026000000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)end
function c1026000000.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c1026000000.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end


you must change c1026000000.activate to c1026000000.operation to gain a reference with the SetOperation;
SetOperation(c1026000000.operation) sometimes its a typing issue dont worry i got that to much too xD.

Marc
  • Marc
  • Advanced Member Topic Starter
2014-03-17T22:33:32Z
Thanks it worked!
Users browsing this topic