GLBasic forum

Main forum => Bug Reports => Topic started by: fuzzy70 on 2012-Mar-03

Title: LOADSPRITEMEM() example in Docs
Post by: fuzzy70 on 2012-Mar-03
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
Title: Re: LOADSPRITEMEM() example in Docs
Post by: kanonet on 2012-Mar-04
Its also wrong in the German help-file.