Script editor tell me an error in this script?

97 views Asked by At

i will use images from defined calculator vars in TI nSpire LUA. Code in Script Editor:

platform.apilevel='1.0'
local img=(var.recall("img2"))
local i=image.new(img)

function on.paint(gc)
    gc:drawImage(i,10,10)
end

But Console gave me error in line 3: image must be PIXEL_BIT_SIZE-bits per pixel I have defined the var img2 as a string in Calculator app. When I paste the string in image.new(string) instead of img then it works, so the error is not the string...

Can someone please help me? I looked so many times for this problem, but i can't find any solutions.

0

There are 0 answers