![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on LUA Help within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; ok, i am trying to get the battery percentage into a variable, so i have this: batlev = System.powerGetBatteryLif ePercent() ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() ![]() Developer
|
ok, i am trying to get the battery percentage into a variable, so i have this:
batlev = System.powerGetBatteryLif ePercent() but when i try to run my program it says its not a proper command... anybody have a better way of getting the battery percentage (i just want a plain number in the variable)
__________________
Windows: A thirty-two bit extension and GUI shell to a sixteen bit patch to an eight bit operating system originally coded for a four bit microprocessor and sold by a two-bit company that can't stand one bit of competition... Personal Development Blog: http://keepitreal-dev.blogspot.com/ |
|
|
|
|
|
#3 |
![]() ![]() Developer
|
okay, but i can't even get THAT far, it stops me right when it sees System.powerGetBatteryLif ePower() it says its a nil value... so maybe i am not using the right command or somthing, kuz lua just isn't wanting to execute that command... and yes i have the latest version of lua.
EDIT: here is the error i get: error: index.lua:46: attempt to call field 'powerGetBatteryLifePerce nt' (a nil value)
__________________
Windows: A thirty-two bit extension and GUI shell to a sixteen bit patch to an eight bit operating system originally coded for a four bit microprocessor and sold by a two-bit company that can't stand one bit of competition... Personal Development Blog: http://keepitreal-dev.blogspot.com/ Last edited by Koba; 09-28-2005 at 04:20 PM.. |
|
|
|
|
|
#5 |
![]() ![]() Developer
|
read up ^ i gave the exact error, and here is whats above it:
-- battery power and heres what is below it: screen rint(11, 2, string.format("%d", blvl), white)
__________________
Windows: A thirty-two bit extension and GUI shell to a sixteen bit patch to an eight bit operating system originally coded for a four bit microprocessor and sold by a two-bit company that can't stand one bit of competition... Personal Development Blog: http://keepitreal-dev.blogspot.com/ |
|
|
|
|
|
#7 |
![]() ![]() Developer
|
i wonder if lua has a official forum... i am sure someone there is a lua pro.
__________________
Windows: A thirty-two bit extension and GUI shell to a sixteen bit patch to an eight bit operating system originally coded for a four bit microprocessor and sold by a two-bit company that can't stand one bit of competition... Personal Development Blog: http://keepitreal-dev.blogspot.com/ |
|
|
|
|
|
#8 |
![]() |
|
|
|
|
|
|
#9 |
![]() ![]() Developer
|
lol thats you??? ok well i fixed it, now when i try to go screen
rint(11, 2, string.format("%d", batlev), white) it says bad arguement 'format' (number expected, got nil)
__________________
Windows: A thirty-two bit extension and GUI shell to a sixteen bit patch to an eight bit operating system originally coded for a four bit microprocessor and sold by a two-bit company that can't stand one bit of competition... Personal Development Blog: http://keepitreal-dev.blogspot.com/ |
|
|
|
|
|
#11 |
![]() ![]() Developer
|
heh, never mind, i fixed it, i just had to declare the variable as an integer before i told it what to contain, string.format so i'm ok now. i just need to know how to make a png keep its transparency, like, gradient transparencies, i dunno how to tell LUA to keep the transparency on a PNG image.
__________________
Windows: A thirty-two bit extension and GUI shell to a sixteen bit patch to an eight bit operating system originally coded for a four bit microprocessor and sold by a two-bit company that can't stand one bit of competition... Personal Development Blog: http://keepitreal-dev.blogspot.com/ |
|
|
|
|
|
#12 | |
|
Quote:
|
||
|
|
|
![]() |
| Tags |
| lua |
| Thread Tools | |
|
|