I'm sure many of you have come across the "Unexpected $end" or "Missing $end" messages many times and it's probably taken you many minutes, hours or even days to find it. If its the latter two...
I thought this would be a useful blog entry as it seems to be a common error that a lot of new coders don't quite understand.
Many new php coders see this message and will not understand it. In...
I'd like to start this blog entry by saying that typically an unexpected error often means that you have a missing semicolon ; at the end of a line of code or a symbol / operator where it should not...
For a while I had a clear warning in my signature about not using this technique, not everyone understood the problem and I used to get quite a few PMs about it. Today I am going to explain this...
This is purely a test post to my blog to see how editing and post deleting work - if at all, after x amount of minutes, days, weeks etc.
How do i add a scroller bar to Screenshot by Lightshot because i know that there are more users in that list but just cant see them due to the size of
Thanks I got in a muddle confusing your posting with another. You are of course correct, but I get some strange results with your code as below. I am
I think a more appropriate forum would be
Unity - Community
substr was flagged as obsolete a long time ago - replaced by slice which also allows negatives for the start and end positions so you don't need the length
The code I gave you works just fine with decimals. Did you actually try it? You can display results to 2 decimal places by using .toFixed(2).