My game runs on PB6.20 but not on PB6.21b9.
I tried to find the bug, but I can't find it yet...


Code here :
viewtopic.php?t=86911
// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)
Does the solution exist with this beta 9?[14 :43 :02] Attente du démarrage du programme...
[14 :43 :02] Type d'exécutable: Windows - x64 (64bit, Unicode)
[14 :43 :02] Exécutable démarré.
[14 :43 :09] [ERREUR] Magic_4x4_12a.pb (Ligne: 773)
[14 :43 :09] [ERREUR] DisplayTransparentSprite(): A sprite should be created with the flag #PB_Sprite_AlphaBlending to use this command.
[14 :43 :31] Le programme a été arrêté.
Yes?
Just add #PB_Sprite_AlphaBlendinginfratec wrote: Sat May 31, 2025 12:54 pm As written in the error message:
add #PB_Sprite_AlphaBlending at all CreateSprite() procedures.
Code: Select all
ExamineDesktops()
InitSprite()
InitKeyboard()
InitMouse()
OpenWindow(0,0,0,DesktopUnscaledX(DesktopWidth(0)),DesktopUnscaledY(DesktopHeight(0)),"Sprite Creation", #PB_Window_BorderLess)
OpenWindowedScreen(WindowID(0),0,0,WindowWidth(0),WindowHeight(0),1,0,0,#PB_Screen_SmartSynchronization)
SetFrameRate(60)
;Sprite Creation
CreateSprite(1,64,64,#PB_Sprite_AlphaBlending)
StartDrawing(SpriteOutput(1))
DrawingMode(#PB_2DDrawing_AllChannels)
Box(0,0,OutputWidth(),OutputHeight(),RGBA(0,0,0,0)) ; This sets the alpha channel to transparent fully
Circle(OutputWidth()/2,OutputHeight()/2,SpriteHeight(1)/2-1,RGBA(255,0,0,255)) ; drawing a red circle
StopDrawing()
Repeat
Repeat: Until Not WindowEvent()
ExamineKeyboard() : ExamineMouse() : ClearScreen(RGB(50,20,20))
DisplayTransparentSprite(1,ScreenWidth()/2-SpriteWidth(1)/2,ScreenHeight()/2-SpriteHeight(1)/2)
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)