Try loading a different image in the same place. Check if you have enough memory to actually load the image first. Check if the file path is correct.
Hi all
I am helping make a lua app and i keep getting this error Image.load: error loading image now i dont think it can be a memoy leak because i have loadfile commands and not dofile commands and the script looks spotless!
Please help!
Benh = Coder, main language C other language LUA
Check out my first C app Super - flasher here
visit my dev site where you can download all of my coding projects - http://benh-pspdev.bravehost.com/
Please visit my site www.pspfanatic.bravehost.com
and join the forums
Try loading a different image in the same place. Check if you have enough memory to actually load the image first. Check if the file path is correct.
sorry heres the code
black = Color.new(0, 0, 0)
background = Image.load("backgrounds/1.png")
loadA = loadfile("index2.lua")
while true do
pad = Controls.read()
screen:blit(0, 0, background)
if pad:cross() then
loadA()
end
screen.waitVblankStart()
screen:flip()
end
Edit - iv tried all those things you said
Benh = Coder, main language C other language LUA
Check out my first C app Super - flasher here
visit my dev site where you can download all of my coding projects - http://benh-pspdev.bravehost.com/
Please visit my site www.pspfanatic.bravehost.com
and join the forums
Try loading a different image in the same place. Check if you have enough memory to actually load the image first. Check if the file path is correct. Check if the image is valid. Check that the image exists.
how do you check if you have enough memory and if i havnt how do i free up memory
Benh = Coder, main language C other language LUA
Check out my first C app Super - flasher here
visit my dev site where you can download all of my coding projects - http://benh-pspdev.bravehost.com/
Please visit my site www.pspfanatic.bravehost.com
and join the forums
Use the LuaPlayer function to check for free system memory. TO free up memory, you let the variable fall out of scope and garbarge collection takes care of the rest.
could you give me the garbage collection code please and tell me where to put in the script
Benh = Coder, main language C other language LUA
Check out my first C app Super - flasher here
visit my dev site where you can download all of my coding projects - http://benh-pspdev.bravehost.com/
Please visit my site www.pspfanatic.bravehost.com
and join the forums
Garbarge Collection that exists in the languages available are automatic. Eg Java, C#.
eg
if true then
local blah -- memory is allocated and the variable/reference is onto pushed the stack
end
-- blah is no longer in scope and is popped off the stack and garbarge collection frees the memory allocated for it since there is no reference to it anymore
i still dont get it, what is the garbage collection code
Benh = Coder, main language C other language LUA
Check out my first C app Super - flasher here
visit my dev site where you can download all of my coding projects - http://benh-pspdev.bravehost.com/
Please visit my site www.pspfanatic.bravehost.com
and join the forums
There is no garbarge collection code. It is AUTOMATIC and part of the language feature.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks