menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripters
number value to string and vice versa
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
number value to string and vice versa
rowerowe71
Join Date: 2013-04-14
Post Count: 1999
#182938301
Wednesday, February 03, 2016 6:12 PM GMT
how would i convert a number value to a string and a string to a number value i always forget stuff like this :(
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
ElectoStriking
Join Date: 2014-05-10
Post Count: 1547
#182938414
Wednesday, February 03, 2016 6:15 PM GMT
tostring(13398) tonumber("Hello")
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
rowerowe71
Join Date: 2013-04-14
Post Count: 1999
#182938437
Wednesday, February 03, 2016 6:16 PM GMT
oh duh thanks
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
LegendaryAccount
Join Date: 2010-06-02
Post Count: 13193
#182938441
Wednesday, February 03, 2016 6:16 PM GMT
String = "1" realnum = tonumber(String) String = tostring(realnumber)
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
LegendaryAccount
Join Date: 2010-06-02
Post Count: 13193
#182938468
Wednesday, February 03, 2016 6:17 PM GMT
electro tonumber does not work like that
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
ParadigmaticAnon
Join Date: 2016-01-25
Post Count: 182
#182940482
Wednesday, February 03, 2016 7:16 PM GMT
"electro tonumber does not work like that" It likely would have been better to explain that "tonumber()" will return "nil" for numerically-invalid characters.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right