|
Health and Experience and Bars, oh my!
|
Reply to this subject
Start a new subject
 
Refresh page
Pages: 1
2
3
4
| Posted by |
Twisol
USA (2,230 posts) bio
|
| Date |
Reply #45 on Tue 01 Mar 2011 06:44 AM (UTC) [ quote
] |
| Message |
Caelen said: I'm not sure what you're asking for... what I pasted above included the command (hp and hpp respectively), the output from the game (the line with HP quantity and HP %), and then what was printed by the debugg scripts.
Oh, heh. I must be more tired than I thought. |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | top |
|
| Posted by |
Caelen
(81 posts) bio
|
| Date |
Reply #46 on Tue 01 Mar 2011 06:50 AM (UTC) [ quote
] |
| Message |
Twisol said:
Oh, heh. I must be more tired than I thought.
I broke it down for ya in an edit :x | top |
|
| Posted by |
Caelen
(81 posts) bio
|
| Date |
Reply #47 on Tue 01 Mar 2011 07:04 AM (UTC) [ quote
] |
| Message |
hp
HP:246/306 SP:33/238 EP:113/155
>
hpp
HP:80% SP:13% EP:72%
HP:244/306%80 -- printed
SP:30/238%13 -- printed
EP:20/155%72 -- printed
>
printing all from the do_prompt_percent...
the HP one looks right, and the SP one too...
but the EP? O_o | top |
|
| Posted by |
Caelen
(81 posts) bio
|
| Date |
Reply #48 on Tue 01 Mar 2011 07:06 AM (UTC) [ quote
] |
| Message |
Caelen said:
function do_prompt_percent (name, line, wildcards)
hpp = tonumber (wildcards [1])
spp = tonumber (wildcards [2])
epp = tonumber (wildcards [3])
hp = max_hp * ( hpp / 100 )
sp = max_sp * ( spp / 100 )
ep = max_ep * ( spp / 100 )
print ("HP:" .. hp .. "/" .. max_hp .. "%" .. hpp)
print ("SP:" .. sp .. "/" .. max_sp .. "%" .. spp)
print ("EP:" .. ep .. "/" .. max_ep .. "%" .. epp)
draw_the_bars ()
end -- do_prompt_percent
...
I found the problem XD
ep = max_ep * ( spp / 100 )
spp, not epp... fixed! | top |
|
| Posted by |
Nick Gammon
Australia (18,800 posts) bio
Forum Administrator |
| Date |
Reply #49 on Tue 01 Mar 2011 07:34 AM (UTC) [ quote
] |
| Message |
So the debugging prints helped, huh?
That's what usually happens to me. I'm not trying to be smart, I make lots of mistakes. But debugging techniques help find them. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
| Posted by |
Twisol
USA (2,230 posts) bio
|
| Date |
Reply #50 on Tue 01 Mar 2011 07:39 AM (UTC) [ quote
] |
| Message |
| D'oh! :D |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
8,159 views.
This is page 4, subject is 4 pages long:
1
2
3
4
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )