It is currently 10 May 2025, 18:55
   
Text Size

Crashing and don't know why

Moderator: CCGHQ Admins

Crashing and don't know why

Postby Malocus » 04 Jan 2012, 22:54

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>
Malocus
 
Posts: 1
Joined: 04 Jan 2012, 22:46
Has thanked: 0 time
Been thanked: 0 time

Re: Crashing and don't know why

Postby thefiremind » 05 Jan 2012, 09:29

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>
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 27 guests


Who is online

In total there are 27 users online :: 0 registered, 0 hidden and 27 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 27 guests

Login Form