LUA blitImage help

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Mak0
Posts: 36
Joined: Thu Jan 27, 2005 8:56 am

LUA blitImage help

Post by Mak0 »

Im trying to simply laod and blit a PNG to screen but I get "error: script.lua:2 attempt to call global 'screenFrame' (a nil value)"

Here's my code, could someone who knows LUA explain to me what i'm doing wrong?

Code: Select all

image01 = loadImage("image.png")
screenFrame(1, 1)
screenFrame(1, 0)

blitImage(0, 0, image01)
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Re: LUA blitImage help

Post by Shine »

The screenFrame function is not available any more, starting with Lua Player 0.3 (see README in the current version). The current version is Lua Player 0.4, with which it should work like this:

Code: Select all

image01 = loadImage("image.png")
blitImage(0, 0, image01)
waitVblankStart()
flipScreen()
Mak0
Posts: 36
Joined: Thu Jan 27, 2005 8:56 am

Post by Mak0 »

worked like a charm. thanks.
Post Reply