Thread: Countdown Timer
View Single Post
  #7  
Old 12-05-2011, 11:24 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Gunderak View Post
And the reason I put them in quotation marks is because when assigning variables values if it's not a number you have to encase it in them, and it's just a habit now.
That is not a good reason to do that. A string literal has "quotemarks", but a numeric literal does not. The script engine, whilst converting from a string to a number, does not always behave how you expect, and this sort of undefined behaviour can make scripts very confusing to debug when they go wrong. Long story short: Just don't do it.

I'm going to move this thread out of the Code Gallery for now, not just because of this, but also because I don't really feel like the code is particularly elegant, robust or educationally useful either.
__________________
Skyld
Reply With Quote