android
  #1  
Old 01-31-2011, 09:53 PM
Adhil Adhil is offline
Junior Member
 
Join Date: Jan 2011
Posts: 2
Default Loading Images in Lua

Hi Folks,

I am newbie to Lua.. My apologize if this forum is not a right place to ask about Lua 5.1 . I don't find any forums for Lua.

I am trying create a frame and load image as its background in Lua 5.1.

I noticed few sites showing 2 lines of code for loading aimage.
...
myimage = image.load("test.bmp");
myimage:draw(0,0,0,0,32,32);.

But it throws error
lua: test.lua:1: attempt to index global 'image' (a nil value).

What .dll/module is used to load image in a frame?

Any help on this is would be appreciated.

-adhil.J
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 01-31-2011, 11:01 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

[Post Moved]

As for you question, We need more information, are you using lua on the x-fi2, psp, or using love lua, or the standerd lua library.
Reply With Quote

  #3  
Old 02-01-2011, 08:52 AM
delirius delirius is offline
Member
 
Join Date: Feb 2010
Posts: 131
Default

if you want to program lua app for x-fi2 you should use simulator from creative to run it not standard lua.

Last edited by delirius; 02-01-2011 at 08:52 AM. Reason: typo :)
Reply With Quote

  #4  
Old 02-02-2011, 10:09 AM
Adhil Adhil is offline
Junior Member
 
Join Date: Jan 2011
Posts: 2
Default Loading Images in Lua

Thanks for the speedy reply. I use standerd Lua library.
Reply With Quote

  #5  
Old 02-03-2011, 09:26 AM
Redwolfhome's Avatar
Redwolfhome Redwolfhome is offline
Junior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 91
Default

Maby you aren´t use the adk from zen xfi2
if you arent test it with the simulator and just test its with the lua intepreter you will get an error!
You have to test it with the simulator.
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 02:05 PM.