koen500
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 2277 |
|
|
| 09 Nov 2013 08:38 AM |
print(tonumber([[0.2]]) > 0.2 print(tonumber([[0,2]]) > nil
Is this just ROBLOX failing or does this have a reason? |
|
|
| Report Abuse |
|
|
| |
|
koen500
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 2277 |
|
|
| 09 Nov 2013 08:41 AM |
Not in Lua, but when I write numbers down. I use a comma to indicate the decimals. They should be using both in my opinion. |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 09 Nov 2013 08:43 AM |
| So, 5,000,000,000 = 5,000,000.000. |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2013 08:45 AM |
You would use a , to indicate a list of numbers...or in tables
a, b = 1, 2 ab = {1, 2}
And most people use a dot as decimal place, as far as I know only Spanish people use a , (I'm in Spain) |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2013 08:46 AM |
@bohdan,
Nah, people who use a comma switch , and . they don't just use , |
|
|
| Report Abuse |
|
|
As8D
|
  |
| Joined: 24 Dec 2009 |
| Total Posts: 2907 |
|
|
| 09 Nov 2013 08:47 AM |
Stop right there.
In Europe, and probably somewhere else (maybe only the country I live in and OP lives in), commas are used instead of . to indicate where we go from whole numbers to decimals.
0,2 would be 0.2 in US.
And 5.000.000 would be 5,000,000 in US.
Pretty weird and leads to communication problems, but yesh, that's how it is.
So in some ways, it would be good to have that upgrade of tonumber, but I think it needs an argument to determine whatever , is for decimals or large numbers and vice versa with .
- As, in ROBLOX Studio 2013, when you change a number property manually, the rule above is active too! What?!?!?!?! |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2013 08:48 AM |
Roblox is an American company; as such it does not make sense that they should use a primarily European method of recording numbers. Using both 0,2 and 0.2 to mean 2/10 could cause a great many problems. Indeed, far more problems than using two systems would fix.
-God Bless- |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 09 Nov 2013 08:52 AM |
Ah, excuse my ignorance please.
But, yes. Roblox is a American Company. But from their motives and attempts to support different languages. This may as well be a consideration. |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 09 Nov 2013 08:55 AM |
This isn't a problem with Roblox. This is to do with Lua itself, and isn't a problem. Most, if not all programming languages are like this. Using a , as a decimal point would completely through the parser. What would this do: x, y = 0,2 Would it do this: x = 0; y = 2; Or: x = 0.2; y = nil; |
|
|
| Report Abuse |
|
|
koen500
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 2277 |
|
|
| 09 Nov 2013 08:57 AM |
As8D is right, I'm European, and as someone else said this is an American company. I'm just wondering why Roblox had chosen for that.
I'd say: Five milion: 5.000.000 Two and a half: 2,5 Two and a half milion: 2.5 mil / 2.500.000 Two milion, five hundred, twenty-five and one third: 2.000.525,3
It's just the way you do it. |
|
|
| Report Abuse |
|
|
koen500
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 2277 |
|
|
| 09 Nov 2013 08:59 AM |
This would be my rendition:
local function GetNumber(String) local NewString = String for Number = 1,NewString:len() do if NewString:sub(Number, Number) == [[,]] then NewString = NewString:sub(1,Number - 1) .. [[.]] .. NewString:sub(Number + 1) end wait() end return tonumber(NewString) end |
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 09 Nov 2013 10:30 AM |
| in finland 1,500,000 is just 1 500 000. |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Nov 2013 12:27 PM |
If you really need this, then just change some things around. Write your own tonumber.
while obamacare() do benefitMiddleClass() end --LuaWeaver |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2013 03:36 PM |
| while obamacare() do chargePeopleforHealthcaretheydontNeed() end --whatnow303 |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 09 Nov 2013 03:44 PM |
1000000 is one million 1,000,000 is one million 1,000.000 is one thousand 1.000.000 does not mean something |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
| |
|
|
| 09 Nov 2013 09:20 PM |
| "When they traced the killer's IP address, it was from the 192.168/16 block. Just kidding, it was from the 10/8 block." |
|
|
| Report Abuse |
|
|
uyjulian
|
  |
| Joined: 29 Nov 2012 |
| Total Posts: 1214 |
|
|
| 09 Nov 2013 10:32 PM |
numbers and internationsasals pl0x
1000000 is easy to read 1,000,000 1.000.000 complicated pl0x |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
| |
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 10 Nov 2013 12:58 PM |
When they traced the killer's IP address, it was 127.0.0.1 - not whatever.
Idiots. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|