Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
I recently started to receive a random compile error on one of my projects. None of the other projects I have reports this error, despite using the exact same code, and I cannot for the life of me tell what is causing the error. I have tried clearing persistent, but the error prevents that, as it prevents forcing a recompile. The only information I am given is keyword argument 'xalign' is incompatible with 'xpos' in regards to the following code:
*align is a *pos and *anchor bundled together and cannot be used together with either one, that would be the same as providing xpos twice. It was always that way, but recently was promoted from undefined behavior (results wary epending on how particular transform was defined) to hard error.
Choose what you want to use, pos+anchor or align and use only that.
Ocelot wrote: ↑Sat Nov 11, 2023 4:13 am
It is literally what it says:
*align is a *pos and *anchor bundled together and cannot be used together with either one, that would be the same as providing xpos twice. It was always that way, but recently was promoted from undefined behavior (results wary epending on how particular transform was defined) to hard error.
Choose what you want to use, pos+anchor or align and use only that.
If it wasn't for the fact that 5 other projects use the same code without error, then your answer would make sense. But since I have the same exact code running without problem in other projects "It is literally what it says" means absolutely nothing. Either this project has an issue that I cannot detect or I have 5 projects running code that by all rights shouldn't be able to function.
Possibiities are:
1) RenPy on those projects is not updated to the latest version.
2) That code wasn't run yet. Simply having it in your script does not guarantee that it iwll be executed in compile time. Make sure you actually trigger offending ATL to see if it would crash in runtime.
This is a fairly new check. The other projects likely have a subtle bug in them - not only do xpos and xalign conflict, but the way the two properties conflict varies from computer to computer, so it will work on some computers and not others.
Supporting creators since 2004 (When was the last time you backed up your game?)
I just want to add, that you're not only trying to set two different positions (xpos 657 and xpos 0.5 of parent width / same for ypos), but also try to anchor it at different anchors (xanchor 0.5 and xanchor 0.0 by setting anchor / same for yanchor). You're trying to violate the Pauli exclusion principle.