gorem2k wrote:EDIT
PACT_OF_THE_TITAN makes DotP crash but is playable.
script_log.txt
[lua] [string "PACT_OF_THE_TITAN_130638_TITLE (RESOLUTION_TIME_ACTION) [843]"]:2: attempt to index a nil value
The 2 things are actually unrelated. Your
Pact of the Titan makes the game crash (at the end of a match I guess) because you forgot the TOKEN_REGISTRATION. The error in SCRIPT_LOG.TXT doesn't depend on that, I'm pretty sure. Line #2 is actually the first line of code (the log starts counting lines from <RESOLUTION_TIME_ACTION>), so it can be only one of the following:
- local token_count = 1 --> Declaring variables can't give any error.
- local delayDC = EffectDC():Make_Chest(1) --> This would raise the error if EffectDC was nil, but I don't think it's possible: setting something inside EffectDC or ObjectDC usually initializes them if needed.
- local player = EffectDC():Get_PlayerPtr(0) --> This is the only one left. Getting something is different from setting something, and I guess EffectDC doesn't get initialized if needed. Of course you never start the delayed trigger without passing the player to it, but the AI could try to do that while evaluating the card. This doesn't prevent the card from working, though. If you want to avoid the error, surround the delayed trigger this way:
- Code: Select all
<RESOLUTION_TIME_ACTION>
if EffectDC() ~= nil then
-- leave everything else as you wrote it
end
</RESOLUTION_TIME_ACTION>
EDIT: Be aware that your
Stinkdrinker Daredevil lowers the cost of Giant
and Shaman spells, while it shouldn't. You need to remove
- Code: Select all
or FilteredCard():GetSubType():Test( CREATURE_TYPE_SHAMAN ) ~= 0
Also, this isn't really a bug, but you might want to add a query that lets players decide whether they want to search their libraries with
Giant Harbinger or not. The chosen card is put onto the library, so in case you need to play
Giant Harbinger just to protect yourself, but you wish to keep the top card of your library as it is, you may want to avoid the search. Of course if there's nothing in your deck that lets you rearrange the top cards of your library, this scenario won't occur. Anyway, if you need a template, look for
Flamekin Harbinger in my mod.