Comments (7)
I should probably provide more info on that "attachment dictionary in use" error. Basically what's going on is the card attachment function accesses a global variable that's shared between players, which stores a list of each card and what it's attached to.
When you activate the attachment function, it grabs the attachment list and then LOCKS that variable, preventing other players from trying to manipulate it. Then the function processes, figuring out what card you targeted, then adding that relationship to the attachment list and then UNLOCKING it. So when you get that error message, it means that the script has failed and canceled out somewhere in between the locking and unlocking steps, permanently locking the attachment list.
All this being said, I've tried my best to seal up as many flaws/holes in the code as possible, but there will always be little corner cases that slip through and screw up card attachment (and alignment). What I'll need from you in order to fix this is to find out the situation that caused you to get this error.
- What function/hotkey did you/opponent use that gave this message? Most of the time it's gonna be the attach card function, but just in case.
- If #1 was "attach card", what was the LAST successful combination of cards that were attached?
- What did you and your opponent do in between these two steps?
3.5) What specifically did you change about the combination of cards in #2?
If you can't remember the last situation that did it, just keep these steps in mind as it will probably happen again.
from mtg-octgn.
I just got it again, the specific error is
----Python Error----
Traceback (most recent call last):
TypeError: Value cannot be null.
attach(Card(133561), 196.976, -87.531)
----End Error----
When I was trying to attach a phantasmal image to a copy of gravecrawler, and then when I swung it aligned wonky so I basically tried to attach to the card it was already attached to.... I'm not surprised it crashed... (using ctrl+q)
Could we add an unlock clause to the pass-turn button? possibly have a backup of the variable, when going into the attach process?
[attach]
$global2=$global1
proceed to locking and further functions
[/attach]
then if anything goes wrong
[passTurn]
if $global1_locked = true
Unlock_Global($Global1)
$global1 = $global2
end_if
clearStack()
[/pass the turn]
(hypothetically coding, of course :p)
from mtg-octgn.
can you play around with that scenario to see if you can reliably replicate it? I can't get it to happen on my end, so we may need to meet at some point so I can see it.
from mtg-octgn.
I released a new version. It didn't directly fix your issue as I still haven't been able to locate it, but the update DID revamp the alignment and card attachment code. It may have inadvertently fixed it though, so give it a try and see if it still happens.
The issue with an unlock button is that the attachment dictionary that is shared between all players gets wiped clean each time it is accessed, and then replaced with an updated dictionary once the script finishes. The only way to actually unlock it again is to permanently wipe it, which would lose the links between all attachments already in play. I'd much rather plug all the potential holes in the code then resort to something that drastic
from mtg-octgn.
okay-- it seems better now. I was able to reliably get the error in .0.9 by attaching the targeted card to itself. This no longer occurs in .0.10
Cheers!
from mtg-octgn.
K good to hear :)
Now for the other two issues...
-
i try to avoid auto-drawing as much as I can due to card drawing being irreversible by nature, for events where a card ability changes the way you draw cards during certain times. Other than that, the phase system should already be similar to what you described?
-
that sounds more like an actual bug in OCTGNs code. If it happens again it would be better to post it in OCTGN's github issues instead
from mtg-octgn.
sounds like this is no longer an issue.
from mtg-octgn.
Related Issues (20)
- Bomat Courier (NEW card from Kaladesh) HOT 3
- changing phases should reset player priority HOT 1
- Bugs/feature requests HOT 1
- fix collector numbers of token cards
- Gold-Forge Garrison HOT 3
- Feature request: Add fateseal option HOT 3
- Feature request: Add an option to seperate attackers
- Feature request: Make flashback the default action for graveyard
- cards that allow more than one mode selected are broken
- XLN merfolk replacement tag has XLN illusion's GUID
- Dromoka's Command (Dragons of Tarkir) error. HOT 1
- meld cards dont have back sides HOT 1
- Feature requests: shuffle hand action, remove most recent counter action, better separating of attackers/blockers, better shuffling cards to bottom
- Token sets missing images HOT 1
- Image Downloader: Fails to find Master's Edition
- Feature Request: "Look At X" cards to be sent to Bottom of Library; Also Randomly
- Image Downloader URL not found HOT 1
- Special Decks fail to load HOT 1
- Attempting to cast "+2 Mace" from hand causes an autoscript error HOT 1
- Any chance of including the deck converter as part of this rather than haivng to download seperately?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtg-octgn.