Page 1 of 1

Crashing and don't know why

PostPosted: 04 Jan 2012, 22:54
by Malocus
Hi, I am trying to get Goblin Offensive working but for some reason it crashes my game. I have done some testing and it seems like it only crashes when I use three or more different color mana to pay it's casting cost. I just can't figure out why. I'm new to creating cards so I really need some help, I don't have a clue how to fix it.

| Open
<?xml version="1.0"?>
<MULTICARDS>
<CARD>
<TITLE text="GOBLIN_OFFENSIVE_TITLE"/>
<FILENAME text="GOBLIN_OFFENSIVE"/>
<COLLECTIONMAX value="0"/>
<COLLECTORNUMBER value="0"/>
<ARTID value="77770136"/>
<FRAMECOLOUR name="R"/>
<COLOR value="R"/>
<ARTIST name="Carl Critchlow"/>
<CASTING_COST cost="{X}{1}{R}{R}"/>
<CARDNUMBER value="0"/>
<FLAVOURTEXT text="GOBLIN_OFFENSIVE_FLAVOUR"/>
<TYPE metaname="Sorcery"/>
<EXPANSION metaname="7777"/>
<RARITY metaname="Uncommon"/>
<TOKEN_REGISTRATION type="Goblin11ALA_Token"

reservation="5" />
<SPELL_ABILITY>
<EFFECT>
Object():Register_Set( 0, Object

():GetManaX() )
local pCount = Object():GetManaX()

while (pCount &gt; 0) do
pCount = pCount - 1
local token = MTG():ObtainToken(

"Goblin11ALA_Token", Object():GetPlayer() )
if (token ~= nil) then
token:Register_Object_Set( 0,

Object())
token:PutIntoPlay( Object

():GetPlayer() )
end
end
</EFFECT>
</SPELL_ABILITY>
<AI_SCORE_MULTIPLIER zone="hand" value="30" />
<SFX text="special_Martial_Coup" />
</CARD>
</MULTICARDS>

Re: Crashing and don't know why

PostPosted: 05 Jan 2012, 09:29
by thefiremind
I'm more familiar with DotP2012, so I could say something wrong, anyway I can't understand the use of registers. I would do it this way:
Code: Select all
<EFFECT>
local pCount = Object():GetManaX()

while (pCount &gt; 0) do
  pCount = pCount - 1
  local token = MTG():ObtainToken("Goblin11ALA_Token", Object():GetPlayer())
  if (token ~= nil) then
    token:PutIntoPlay( Object():GetPlayer() )
  end
end
</EFFECT>