So I decided to try and make a fantasy themed adventure deck by replacing the image of the standard deck.

I have built a module and and it is all working apart from when a player drags a card to the chat box it gives this error message

Script Error: [string "desktop/scripts/drophandler_adventurecard.l..."]:29: attempt to index local 'cardinfo' (a nil value)

It works when the gm drags the card to the chat box, its only happens on the player side.

I suspect it is something to do with the way I named things in this part of the module

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<root version="2.8">
<library>
<fantasyadventuredeck static="true">
<name type="string">Fantasy Adventure Deck</name>
<categoryname type="string">Adventure Deck</categoryname>
<entries>
<_00_card_list>
<librarylink type="windowreference">
<class>sw_referenceindex</class>
<recordname>..</recordname>
</librarylink>
<name type="string">Fantasy Cards</name>
<index>
<_001_Ace_Fantasy>
<listlink type="windowreference">
<class>imagewindow</class>
<recordname>refimage.cards.Ace_Fantasy@Fantasy Adventure Deck</recordname>
</listlink>
<name type="string">Ace_Fantasy</name>
</_001_Ace_Fantasy>
</index>
</_00_card_list>
<_01_card_001_Ace_Fantasy>
<librarylink type="windowreference">
<class>imagewindow</class>
<recordname>refimage.cards.Ace_Fantasy@Fantasy Adventure Deck</recordname>
</librarylink>
<name type="string">&#160;&#160;Ace_Fantasy</name>
</_01_card_001_Ace_Fantasy>
</entries>
</fantasyadventuredeck>
</library>
<refimage>
<cards>
<Ace_Fantasy>
<cardId type="string">Ace_Fantasy</cardId>
<type type="string">adventurecard</type>
<image type="image">
<bitmap>images/Ace_Fantasy.jpg</bitmap>
</image>
</Ace_Fantasy>
</cards>
</refimage>
</root>
If anyone is feeling particularly bored and/or helpful and can give me any pointers I would be really grateful