Okay, my question is how would I determine the first, second, and third didgit number using code. Like if I needed to check if the second number of src.velocity was to determine the icon state of something.
I suppose if I were a better coder I would know how to use len to figure this out but unfortunetly I'm not so, how would I go about doing this?
NOTE: Yeah I used search, couldn't find anything relevant though.
ID:158512
![]() Aug 13 2009, 3:51 pm
|
|
![]() Aug 13 2009, 3:52 pm
|
|
Turn it into a string and use copytext(), findtext(), or text2ascii().
|
SadoSoldier wrote:
Okay, my question is how would I determine the first, second, and third didgit number using code. Like if I needed to check if the second number of src.velocity was to determine the icon state of something. First digit is round(n/100). Second digit is round((n%100)/10). Third digit is round(n%10). |
Note that that does assume it's only three digits. If it can be more, the first one would be round((n%1000)/100). But that wouldn't be the "first" digit.
|