Search found 4 matches

by Classy_Lemon
Tue Aug 08, 2023 4:20 am
Forum: Ren'Py Questions and Announcements
Topic: TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int'
Replies: 7
Views: 722

Re: TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int'

Imperf3kt wrote: Tue Aug 08, 2023 3:12 am You've used define, you probably want default
What's the difference between them? I just used code I found here on the forums for it.
by Classy_Lemon
Tue Aug 08, 2023 4:19 am
Forum: Ren'Py Questions and Announcements
Topic: TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int'
Replies: 7
Views: 722

Re: TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int'

Aside from the initial definition, you can try adding additional checks. init python: if persistent.dialogueBoxOpacity is None: persistent.dialogueBoxOpacity = 0.0 I might have just put it in a bad spot because this seems to have fixed it. Then again I am unable to replicate it so I will need to wa...
by Classy_Lemon
Tue Aug 08, 2023 1:44 am
Forum: Ren'Py Questions and Announcements
Topic: TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int'
Replies: 7
Views: 722

Re: TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int'

Ocelot wrote: Mon Aug 07, 2023 5:46 pm How "dialogBoxOpacity" is defined in yor code?
This error should only happen when this value is not set.

Code: Select all

define persistent.dialogueBoxOpacity = 0.0
Right before the start label. It should be noted that only a few people are getting this
by Classy_Lemon
Mon Aug 07, 2023 4:28 pm
Forum: Ren'Py Questions and Announcements
Topic: TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int'
Replies: 7
Views: 722

TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int'

Some people are getting an error when entering the Options menu in my game, with the following traceback I'm sorry, but an uncaught exception occurred. While running game code: File "game/screens.rpy", line 1096, in execute screen preferences(): File "game/screens.rpy", line 1096...