Is there any way to make a string display the numbers of a counter?
Is there any way to make a string display the numbers of a counter?










Put the value inside str$() to parse it.
Like this:
str$(value("Counter 1"))
Ah thanks popcornHowever I need to change it a bit more, I am using two counters for my timer in my application. One is a 00.00 counter for seconds like 13.45, then when it goes over to 1 minute (60.00) I add 1 to another counter for the minutes and reset the other one again. So in the end of my game the first counter may be 06 (6minutes), and the other counter may stop at 35.52 (35 seconds +). Together the counters will look like they are displaying 06.35.52
So I need to transfer this to the string somehow. I was thinking if it was possible to insert the first counters value first, and then the other counter value after in the string.
The problem now is when I try for one of the strings and it is for example 04.36 I get 4.357 in the string
Ok i managed to get everything right in the string by doing this: Str$(value( "TimeCounter" ))+"."+Str$(value( "TimeCounter 2" ))
It first displays the first counter then a "." then the second counter that is made up of a 00.00 number. So the final in the string is something like 03.34.54
The problem now is that I try to have this as a score to upload to highscores from jeffs simple highscore example. But the score wont upload if I dont remove the dots before i press the upload button :/
Is it because it does not recognize this as a whole number? Which may be a problem when comparing the values of the scores to sort in the highscores to?..
Well yeah, because "03.34.54" is not a valid number in the first place. You can't expect MMF to understand your made up math logic. :P I'm not sure you can't use a single decimal point... but I'm positive you can't use two. lol
Since all of your scores are formatted like ##.##.## couldn't you remove the decimals and just send the highscores like "033454", and once you retrieve them, you could reformat them back as "03.34.54" by inserting the decimal points back in?
Ok that sounds logical :P Yes that sounds like something that could work if I knew how to do it :/ It sounds like what I am trying to do in this thread if you could take a look at it please?http://community.clickteam.com/showthread.php?t=71106
Ok I have now got out the numbers in one row, but how do I put the two decimal points in between the number? The event that retrieves the numer I believe is: Set alterable string: listGetAt$( "String Parser", 2)