LOADSPRITEMEM() example in Docs

Previous topic - Next topic

fuzzy70

Just a simple change needed to the online help. While trying out this command from the example in the help I kept getting compile errors & after a bit of head scratching figured out the problem.
Code (glbasic) Select

LOCAL w%, h%, pix%[]
IF LOADSPRITEMEM("test.png", w%, h%, pix%[])
   MEM2SPRITE(0, w%, h%, pix%[])
   DRAWSPRITE 0,0,0
ENDIF
SHOWSCREEN
MOUSEWAIT


Just swap the "MEM2SPRITE(0, w%, h%, pix%[])" with "MEM2SPRITE(pix%[],0, w%, h%)" will fix it, might have been a simple typo or the array may have been the last parameter in an older version of GLB.

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

kanonet

Its also wrong in the German help-file.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64