|
Post by genleo on Oct 30, 2024 2:06:59 GMT
When putting a dividing element between two parts of a combined field consisting of two fields in the Lorcana template everything worked fine. But when working on a template for another game with more than one divider between more than two fields i get the following error on opening a file or starting a new template. It still renders the card properly, but I can't imagine it is no problem. At the very least, the program seems to run quite slowly.
As far as I can tell, the offending line of code is:
|
|
kolya
1/1 Squirrel
Posts: 74
Formerly Known As: fedosu
Color Alignment: Blue, Red, Green
|
Post by kolya on Oct 30, 2024 3:17:11 GMT
My solution to this problem was to add a check for the number of blocks. This seems to happen because when a block is empty, the program treats it as non-existant.
So the code would be something like:
top: { 596 + ( if length(card_style.card_back_ability_rules.layout.blocks) < 1 then 0 else card_style.card_back_ability_rules.layout.blocks[1].bottom ) - 3 }
|
|
|
Post by genleo on Nov 1, 2024 2:29:17 GMT
Thank you. While I couldn't get that exact code to work, it did point me in the right direction to fix two templates I've been working on.
top: {596 + (if card_style.card_back_ability_rules.layout.blocks[1].bottom or else 0 > 0 then card_style.card_back_ability_rules.layout.blocks[1].bottom else 176) - 3}
Unfortunately, it would seem something else is slowing things down. Even without the error messages I still need to wait for it to catch up with my typing, and I am not a great typist.
|
|
kolya
1/1 Squirrel
Posts: 74
Formerly Known As: fedosu
Color Alignment: Blue, Red, Green
|
Post by kolya on Nov 2, 2024 1:06:10 GMT
Yea, I haven't updated to MSE 2.5, so the script may need to change. I've never been able to get "or else" to work.
Glad you got to a solution.
|
|