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[])

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.