LOADSPRITEMEM bug

Previous topic - Next topic

ampos

The function LOADSPRITEMEM does not like values as absolute numbers, gives an error at compile runtime


Works:
Code (glbasic) Select
ok=LOADSPRITEMEM("myfile.jpg",w,h,pix[])

Error:
Code (glbasic) Select
ok=LOADSPRITEMEM("myfile.jpg",2000,1000,pix[])
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

MrTAToad

#1
Thats because the second and third parameters are passed size of the sprite (width and height), and of course, a value can't be stored in an fixed value...

Kitty Hello

it's BYREF - you must pass a referene here that will tell you the size of the loaded image.