QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

help with psp lua -displaying time

This is a discussion on help with psp lua -displaying time within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; is there a way to display the time in lua ? and also i cant get the battery functions to ...

Reply
 
LinkBack Thread Tools
Old 09-26-2005, 01:10 PM   #1
 
mrneo240's Avatar
 
Join Date: Jul 2005
Posts: 41
Trader Feedback: 0
Question help with psp lua -displaying time

is there a way to display the time in lua ?
and also i cant get the battery functions to work
here is my code


-- battery level indicator
battlvl = System.powerGetBatteryLif ePercent()
screenrint(425, 254, battlvl, white)
mrneo240 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-26-2005, 01:20 PM   #2
 
PurePwnage's Avatar
 
Join Date: Sep 2005
Location: Miami, Florida.
Posts: 217
Trader Feedback: 0
Default

Quote:
Originally Posted by mrneo240
is there a way to display the time in lua ?
and also i cant get the battery functions to work
here is my code


-- battery level indicator
battlvl = System.powerGetBatteryLif ePercent()
screenrint(425, 254, battlvl, white)
you forgot to put the screen:flip for it to be rendered :P
__________________
[url]http://rscx.com/RSCXTESTING/chris/siggy.jpg[/url]
-=-=-=-=-=-=-
"15% percent of programing is creating a program, 85% percent is getting to work like it f*cking should." - MagicianFB
PurePwnage is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-26-2005, 01:41 PM   #3
 
mrneo240's Avatar
 
Join Date: Jul 2005
Posts: 41
Trader Feedback: 0
Smile thx for the help

when i put that i get the same error as before


-- battery level indicator
battlvl = System.powerGetBatteryLif ePercent()
screenrint(425, 254, battlvl, white)
screen.flip()

error:script.lua:337 attempt to call field 'powergetbatterylifeperce nt' (a nil value)


press start to restart

Last edited by mrneo240; 09-26-2005 at 01:49 PM.. Reason: new problem
mrneo240 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-26-2005, 02:03 PM   #4
 
Join Date: Sep 2005
Posts: 11
Trader Feedback: 0
Default

screen:flip() not screen.flip()
omgzrob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-26-2005, 02:05 PM   #5
I think I ripped my pants
 
whitehawk's Avatar
 
Join Date: Jul 2005
Real First Name: Matt
Location: Toronto
Just Played: Trials HD
Posts: 6,485
Trader Feedback: 0
Default

Quote:
Originally Posted by mrneo240
when i put that i get the same error as before


-- battery level indicator
battlvl = System.powerGetBatteryLif ePercent()
screenrint(425, 254, battlvl, white)
screen.flip()

error:script.lua:337 attempt to call field 'powergetbatterylifeperce nt' (a nil value)


press start to restart
Code:
screen:print.
whitehawk is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-26-2005, 02:13 PM   #6
 
Jenay's Avatar
 
Join Date: Jun 2005
Posts: 52
Trader Feedback: 0
Default

System.powerGetBatteryLif ePercent() is a number you need to convert it to a string, something like

screen:print(425, 254, string.format("%d", battlvl), white)
Jenay is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-26-2005, 02:15 PM   #7
 
mrneo240's Avatar
 
Join Date: Jul 2005
Posts: 41
Trader Feedback: 0
Default thx so much

you guys were a lot of help thx
mrneo240 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-26-2005, 02:36 PM   #8
 
PurePwnage's Avatar
 
Join Date: Sep 2005
Location: Miami, Florida.
Posts: 217
Trader Feedback: 0
Default

Quote:
Originally Posted by mrneo240
you guys were a lot of help thx
np.. im still learning lua btw.. i need an advanced tutorial if some1 can help me out :P.
__________________
[url]http://rscx.com/RSCXTESTING/chris/siggy.jpg[/url]
-=-=-=-=-=-=-
"15% percent of programing is creating a program, 85% percent is getting to work like it f*cking should." - MagicianFB
PurePwnage is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-26-2005, 04:23 PM   #9
NDS Mod
 
MagicianFB's Avatar
 
Join Date: Jul 2005
Location: w00+land
Posts: 645
Trader Feedback: 0
Default

Quote:
Originally Posted by PurePwnage
np.. im still learning lua btw.. i need an advanced tutorial if some1 can help me out :P.
http://www.lua.org/pil/ is good to learn to check out for learning lua.
__________________
"15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
[URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]
MagicianFB is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
displaying , lua , psp , time

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 08:21 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us