Stock.onItemCreate - card_id or div_id?

Game development with Board Game Arena Studio
Post Reply
User avatar
BitBlitz
Posts: 45
Joined: 04 November 2020, 02:07

Stock.onItemCreate - card_id or div_id?

Post by BitBlitz »

The documentation for Stock.onItemCreate shows the 3rd parameters as "card_id", but it seems to be the div id, not the card_id.

In other words, it's exactly the same of card_div.id

Is this intentional, or am I doing something wrong?

Is it true that the card_div.id will ALWAYS end with an underscore and card_id? Can I just parse it off the end of the id reliably?
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

Re: Stock.onItemCreate - card_id or div_id?

Post by Victoria_La »

Div id is always <stock_id>_item_<card_id>

if its not card_id its probably a bug in implementation div id is not really needed here as div node passed already as first parameter
User avatar
BitBlitz
Posts: 45
Joined: 04 November 2020, 02:07

Re: Stock.onItemCreate - card_id or div_id?

Post by BitBlitz »

@Victoria_La: Thanks
Post Reply

Return to “Developers”