| View previous topic :: View next topic |
| Author |
Message |
arrggg
Joined: 29 Sep 2005 Posts: 11
|
Posted: Thu Sep 29, 2005 10:12 am Post subject: powerGetBatteryLifePercent ??? |
|
|
I tried a simple program..
| Code: |
System.usbDiskModeActivate()
-- Battery Level View
white = Color.new(255, 255, 255)
screen:clear()
batlev = System.powerGetBatteryLifePercent()
screen:print(11, 2, string.format("%d", batlev), white)
screen.flip()
screen.waitVblankStart(3000) |
and i get
error: test.lua:5: attempt to call field 'powerGetBatteryLifePercent' (a nil value)[/code] |
|
| Back to top |
|
 |
Koba
Joined: 29 Sep 2005 Posts: 59
|
Posted: Thu Sep 29, 2005 11:01 am Post subject: |
|
|
| i am having this exact same problem, thats why i am here lol, but i can't ever seem to get System.powerGetBatteryLifePercent() to work... i'll keep an eye out for any projects that use the command to see what we are doing wrong. |
|
| Back to top |
|
 |
Koba
Joined: 29 Sep 2005 Posts: 59
|
Posted: Thu Sep 29, 2005 11:35 am Post subject: |
|
|
ok, download this version of LUA: http://www.luaplayer.org/LuaPlayer_v0.10.3_firmware15.zip
and then the powerGetBatteryLifePercent() command will work. now my question is, how do i store that in a integer? or how do i create integers in lua? |
|
| Back to top |
|
 |
|